mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-app tweaks
This commit is contained in:
parent
44b3068873
commit
3c135c22a8
@ -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" \
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 || \
|
||||
|
||||
@ -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; \
|
||||
|
||||
@ -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; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user