mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-web: fix return value
This commit is contained in:
parent
961008cd46
commit
fa2279faa9
@ -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
|
||||
|
||||
19
update.sh
19
update.sh
@ -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 || \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user