Welcome to mirror list, hosted at ThFree Co, Russian Federation.

entrypoint.sh « cypress - github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8efe3d36d7c1cd4be1de90fe9379c835996a2a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# Ensure correct permissions, as the bind-mount might currupt them (and prevent the installation)
[ -e /var/www/html/custom_apps ] && chown -R www-data:www-data /var/www/html/custom_apps > /dev/null 2>&1

NEXTCLOUD_UPDATE=1
export NEXTCLOUD_UPDATE
OUTPUT=$(/original_entrypoint.sh true)

echo "$OUTPUT"

# Check if new installed
G=$(echo "$OUTPUT" | grep "New nextcloud instance")
if [ $? -eq 0 ]; then
    echo "Nextcloud installed, fill demo data"
    su -s /bin/bash www-data -c "
        php /var/www/html/occ config:system:set debug --value='true' --type=boolean
        export OC_PASS=1234561
        php /var/www/html/occ user:add --password-from-env user1
        php /var/www/html/occ user:add --password-from-env user2
        php /var/www/html/occ app:enable viewer
        php /var/www/html/occ app:enable text
        php /var/www/html/occ app:list
    "
fi

exec $@