2016-04-30 12:57:18 +02:00
|
|
|
#!/bin/sh
|
|
|
|
addgroup -g ${GID} owncloud && adduser -h /owncloud -s /bin/sh -D -G owncloud -u ${UID} owncloud
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
|
|
if [ -f /owncloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
|
|
|
cp /owncloud/config/config.php /config/config.php
|
|
|
|
elif [ -f /config/config.php ]; then
|
2016-04-30 11:42:56 +02:00
|
|
|
if [ -f /owncloud/config/config.php ]; then
|
|
|
|
sed -i "s/.*version.*/`grep "version" \/owncloud\/config\/config.php`/" /config/config.php
|
2016-05-01 20:16:56 +02:00
|
|
|
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
|
|
|
CONFIGINS=`md5sum /owncloud/config/config.php | awk '{ print $1 }'`
|
|
|
|
if [ $CONFIG != $CONFIGINS ]; then
|
|
|
|
mv /owncloud/config/config.php /config/config.php.bkp
|
|
|
|
fi
|
2016-04-30 11:42:56 +02:00
|
|
|
fi
|
2016-05-01 20:16:56 +02:00
|
|
|
cp /config/config.php /owncloud/config/config.php
|
2016-04-11 15:59:32 +02:00
|
|
|
fi
|
|
|
|
|
2016-04-30 12:57:18 +02:00
|
|
|
touch /var/run/php-fpm.sock
|
2016-05-12 00:44:22 +02:00
|
|
|
mkdir /tmp/fastcgi /tmp/client_body
|
2016-04-30 12:57:18 +02:00
|
|
|
chown -R owncloud:owncloud /owncloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
2016-04-11 15:59:32 +02:00
|
|
|
ln -s /apps2 /owncloud
|
|
|
|
|
2016-04-30 12:57:18 +02:00
|
|
|
supervisord -c /etc/supervisor/supervisord.conf
|