ncp-app tweaks

This commit is contained in:
nachoparker 2019-01-05 10:23:40 -07:00
parent 44b3068873
commit 3c135c22a8
6 changed files with 8 additions and 1 deletions

View File

@ -12,6 +12,8 @@
configure()
{
[[ "$PASSWORD" == "" ]] && { echo "empty password"; return 1; }
[[ "$USER" == "" ]] && { echo "empty user" ; return 1; }
[[ "$PASSWORD" == "$CONFIRM" ]] || { echo "passwords do not match"; return 1; }
OC_PASS="$PASSWORD" \

View File

@ -36,7 +36,7 @@ configure()
sudo -u mysql test -x "$BASEDIR" || { echo -e "ERROR: the user mysql does not have access permissions over $BASEDIR"; return 1; }
[[ $( stat -fc%d / ) == $( stat -fc%d "$BASEDIR" ) ]] && \
echo -e "INFO: moving database to another place in the same SD card\nIf you want to use an external mount, make sure it is properly set up"
echo -e "INFO: moving database to the SD card\nIf you want to use an external mount, make sure it is properly set up"
cd /var/www/nextcloud
sudo -u www-data php occ maintenance:mode --on

View File

@ -56,6 +56,7 @@ configure()
return 1
}
[[ "$DATADIR" != "/var/www/nextcloud/data" ]] && \
[[ $( stat -fc%d / ) == $( stat -fc%d "$BASEDIR" ) ]] && {
echo "Refusing to move to the SD card. Abort"
return 1

View File

@ -44,6 +44,8 @@ configure()
{
local DOMAIN_LOWERCASE="${DOMAIN,,}"
[[ "$DOMAIN" == "" ]] && { echo "empty domain"; return 1; }
# Configure Apache
grep -q ServerName $VHOSTCFG && \
sed -i "s|ServerName .*|ServerName $DOMAIN|" $VHOSTCFG || \

View File

@ -35,6 +35,7 @@ install_app ncp.sh; \
# fix default paths
sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup.cfg; \
sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup-auto.cfg; \
# specific cleanup
cd /; rm -r /tmp/ncp-build; \

View File

@ -35,6 +35,7 @@ install_app ncp.sh; \
# fix default paths
sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup.cfg; \
sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup-auto.cfg; \
# specific cleanup
cd /; rm -r /tmp/ncp-build; \