diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-11-04 20:18:59 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-11-04 20:19:30 +0300 |
commit | fa2279faa9c5db091b97376a323275ad1f368ef6 (patch) | |
tree | 52d84e48c94da0c82b2ef03ea7b74ddc70557572 | |
parent | 961008cd4654f53036d89dbf89595664cd3ba0fc (diff) |
ncp-web: fix return valuev0.32.2
-rw-r--r-- | nextcloudpi.sh | 3 | ||||
-rwxr-xr-x | update.sh | 19 |
2 files changed, 21 insertions, 1 deletions
diff --git a/nextcloudpi.sh b/nextcloudpi.sh index 7501f55f..c1d3cefd 100644 --- a/nextcloudpi.sh +++ b/nextcloudpi.sh @@ -109,10 +109,13 @@ touch /run/ncp.log chmod 640 /run/ncp.log chown root:www-data /run/ncp.log launch_script $1 &> /run/ncp.log +RET=$? # clean log for the next PHP backend call to start clean, # but wait until everything from current execution is read sleep 0.5 && echo "" > /run/ncp.log + +exit $RET EOF chmod 700 /home/www/ncp-launcher.sh echo "www-data ALL = NOPASSWD: /home/www/ncp-launcher.sh , /sbin/halt" >> /etc/sudoers @@ -197,7 +197,24 @@ EOF # log adjustment for wizard test -f /home/www/ncp-launcher.sh && \ - grep -q sleep /home/www/ncp-launcher.sh || echo "sleep 0.5 && echo \"\" > /run/ncp.log" >> /home/www/ncp-launcher.sh + cat > /home/www/ncp-launcher.sh <<'EOF' +#!/bin/bash +DIR=/usr/local/etc/nextcloudpi-config.d +test -f $DIR/$1 || { echo "File not found"; exit 1; } +source /usr/local/etc/library.sh +cd $DIR +touch /run/ncp.log +chmod 640 /run/ncp.log +chown root:www-data /run/ncp.log +launch_script $1 &> /run/ncp.log +RET=$? + +# clean log for the next PHP backend call to start clean, +# but wait until everything from current execution is read +sleep 0.5 && echo "" > /run/ncp.log + +exit $RET +EOF # 2 days to avoid very big backups requests to timeout grep -q TimeOut /etc/apache2/sites-enabled/ncp.conf || \ |