mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 12:29:16 +00:00
Merge pull request #26 from kvaps/nextcloud_feature_default_dir
[nextcloud] Feature: sets /data directory as default in install screen
This commit is contained in:
commit
66bd8ee1fb
@ -1,23 +1,15 @@
|
|||||||
#!/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
|
# Set default data directory
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||||
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
supervisord -c /etc/supervisor/supervisord.conf
|
supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
#!/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
|
# Set default data directory
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||||
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
supervisord -c /etc/supervisor/supervisord.conf
|
supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
@ -1,23 +1,15 @@
|
|||||||
#!/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
|
# Set default data directory
|
||||||
cp /nextcloud/config/config.php /config/config.php
|
if [ ! -f /config/config.php ]; then
|
||||||
elif [ -f /config/config.php ]; then
|
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||||
if [ -f /nextcloud/config/config.php ]; then
|
|
||||||
sed -i "s/.*version.*/`grep "version" \/nextcloud\/config\/config.php`/" /config/config.php
|
|
||||||
CONFIG=`md5sum /config/config.php | awk '{ print $1 }'`
|
|
||||||
CONFIGINS=`md5sum /nextcloud/config/config.php | awk '{ print $1 }'`
|
|
||||||
if [ $CONFIG != $CONFIGINS ]; then
|
|
||||||
mv /nextcloud/config/config.php /config/config.php.bkp
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
cp /config/config.php /nextcloud/config/config.php
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/run/php-fpm.sock
|
touch /var/run/php-fpm.sock
|
||||||
mkdir /tmp/fastcgi /tmp/client_body
|
mkdir /tmp/fastcgi /tmp/client_body
|
||||||
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
chown -R nextcloud:nextcloud /nextcloud /data /config /apps2 /var/run/php-fpm.sock /var/lib/nginx /tmp
|
||||||
|
ln -s /config/config.php /nextcloud/config/config.php
|
||||||
ln -s /apps2 /nextcloud
|
ln -s /apps2 /nextcloud
|
||||||
|
|
||||||
supervisord -c /etc/supervisor/supervisord.conf
|
supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user