add: config coping when exit

This commit is contained in:
kvaps 2016-08-16 16:54:54 +03:00
parent 6510cb2114
commit 850e3e41e2
3 changed files with 48 additions and 33 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
function copy_config {
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
cp /nextcloud/config/config.php /config/config.php
elif [ -f /config/config.php ]; then
@ -14,6 +15,10 @@ elif [ -f /config/config.php ]; then
fi
cp /config/config.php /nextcloud/config/config.php
fi
}
copy_config
trap copy_config EXIT
touch /var/run/php-fpm.sock
mkdir /tmp/fastcgi /tmp/client_body

View File

@ -1,6 +1,7 @@
#!/bin/sh
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
function copy_config {
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
cp /nextcloud/config/config.php /config/config.php
elif [ -f /config/config.php ]; then
@ -14,6 +15,10 @@ elif [ -f /config/config.php ]; then
fi
cp /config/config.php /nextcloud/config/config.php
fi
}
copy_config
trap copy_config EXIT
touch /var/run/php-fpm.sock
mkdir /tmp/fastcgi /tmp/client_body

View File

@ -1,6 +1,7 @@
#!/bin/sh
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
function copy_config {
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
cp /nextcloud/config/config.php /config/config.php
elif [ -f /config/config.php ]; then
@ -14,6 +15,10 @@ elif [ -f /config/config.php ]; then
fi
cp /config/config.php /nextcloud/config/config.php
fi
}
copy_config
trap copy_config EXIT
touch /var/run/php-fpm.sock
mkdir /tmp/fastcgi /tmp/client_body