Skip to content

Commit

Permalink
ncp-web: fix php exec with background restarting of processes
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Sep 12, 2017
1 parent c20649d commit c982deb
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 25 deletions.
8 changes: 6 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@

[v0.26.28](https://github.com/nextcloud/nextcloudpi/commit/94eb3ce) (2017-09-08) nc-backup: small fixes
[v0.26.30](https://github.com/nextcloud/nextcloudpi/commit/49705ee) (2017-09-11) ncp-web: fix php exec with background restarting of processes

[v0.26.27](https://github.com/nextcloud/nextcloudpi/commit/649e8b7) (2017-09-10) ncp-web: link to wiki info for each extra
[v0.26.29](https://github.com/nextcloud/nextcloudpi/commit/14167d4) (2017-09-11) remove config txt output

[v0.26.28](https://github.com/nextcloud/nextcloudpi/commit/eba23ea) (2017-09-08) nc-backup: small fixes

[v0.26.27](https://github.com/nextcloud/nextcloudpi/commit/3ec03de) (2017-09-10) ncp-web: link to wiki info for each extra

[v0.26.26](https://github.com/nextcloud/nextcloudpi/commit/6f25713) (2017-09-10) ncp-web: minor tweaks

Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ configure()
sudo -u www-data php $OCC config:system:set overwrite.cli.url --value=https://$DOMAIN_

# delayed in bg so it does not kill the connection, and we get AJAX response
( sleep 2 && systemctl restart apache2 ) &>/dev/null &
bash -c "sleep 2 && systemctl restart apache2" &>/dev/null &
}
rm -rf $NCDIR/.well-known
}
Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/modsecurity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ EOF
[[ $ACTIVE_ == "yes" ]] && a2enmod security2 &>/dev/null || a2dismod security2 &>/dev/null

# delayed in bg so it does not kill the connection, and we get AJAX response
( sleep 2 && systemctl restart apache2 ) &>/dev/null &
bash -c "sleep 2 && systemctl restart apache2" &>/dev/null &
}

cleanup()
Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/nc-httpsonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ configure()
echo "Forcing HTTPS $OPT"

# delayed in bg so it does not kill the connection, and we get AJAX response
( sleep 2 && systemctl restart apache2 ) &>/dev/null &
bash -c "sleep 2 && systemctl restart apache2" &>/dev/null &
}

install() { :; }
Expand Down
16 changes: 8 additions & 8 deletions etc/nextcloudpi-config.d/nc-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ EOF
sudo -u www-data php occ files:scan --all

# cache needs to be cleaned as of NC 12
(
sleep 3
systemctl stop php7.0-fpm
systemctl stop mysqld
sleep 0.5
systemctl start php7.0-fpm
systemctl start mysqld
) &>/dev/null &

bash -c " sleep 3
systemctl stop php7.0-fpm
systemctl stop mysqld
sleep 0.5
systemctl start php7.0-fpm
systemctl start mysqld
" &>/dev/null &
fi
rm -r "$TMPDIR"

Expand Down
2 changes: 1 addition & 1 deletion etc/nextcloudpi-config.d/nc-webui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ configure()
fi

# delayed in bg so it does not kill the connection, and we get AJAX response
( sleep 2 && systemctl restart apache2 ) &>/dev/null &
bash -c "sleep 2 && systemctl restart apache2" &>/dev/null &
}

install() { :; }
Expand Down
11 changes: 0 additions & 11 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,6 @@ test -f /usr/local/etc/ncp-baseimage || echo "untagged" > /usr/local/etc/ncp-bas
# remove artifacts
rm -f /usr/local/etc/nextcloudpi-config.d/config_.txt

# restart PHP to get updates in the ncp-web
# FIXME: php doesn't come up if run from ncp-web
#(
#sleep 3
#systemctl stop php7.0-fpm
#systemctl stop mysqld
#sleep 0.5
#systemctl start php7.0-fpm
#systemctl start mysqld
#) &>/dev/null &

# License
#
# This script is free software; you can redistribute it and/or modify it
Expand Down

0 comments on commit c982deb

Please sign in to comment.