mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
add: config coping when exit
This commit is contained in:
parent
6510cb2114
commit
850e3e41e2
@ -1,19 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
||||||
|
|
||||||
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
function copy_config {
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
cp /nextcloud/config/config.php /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
elif [ -f /config/config.php ]; then
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
if [ -f /nextcloud/config/config.php ]; then
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
if [ $CONFIG != $CONFIGINS ]; then
|
||||||
|
mv /nextcloud/config/config.php /config/config.php.bkp
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
cp /config/config.php /nextcloud/config/config.php
|
||||||
fi
|
fi
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
}
|
||||||
fi
|
|
||||||
|
copy_config
|
||||||
|
trap copy_config EXIT
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
||||||
|
|
||||||
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
function copy_config {
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
cp /nextcloud/config/config.php /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
elif [ -f /config/config.php ]; then
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
if [ -f /nextcloud/config/config.php ]; then
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
if [ $CONFIG != $CONFIGINS ]; then
|
||||||
|
mv /nextcloud/config/config.php /config/config.php.bkp
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
cp /config/config.php /nextcloud/config/config.php
|
||||||
fi
|
fi
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
}
|
||||||
fi
|
|
||||||
|
copy_config
|
||||||
|
trap copy_config EXIT
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
addgroup -g ${GID} nextcloud && adduser -h /nextcloud -s /bin/sh -D -G nextcloud -u ${UID} nextcloud
|
||||||
|
|
||||||
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
function copy_config {
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ -f /nextcloud/config/config.php ] && [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
cp /nextcloud/config/config.php /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
elif [ -f /config/config.php ]; then
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
if [ -f /nextcloud/config/config.php ]; then
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
if [ $CONFIG != $CONFIGINS ]; then
|
||||||
|
mv /nextcloud/config/config.php /config/config.php.bkp
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
cp /config/config.php /nextcloud/config/config.php
|
||||||
fi
|
fi
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
}
|
||||||
fi
|
|
||||||
|
copy_config
|
||||||
|
trap copy_config EXIT
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
|
Loading…
x
Reference in New Issue
Block a user