Skip to content

Commit

Permalink
nc-limits: fix PHP service restart
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Oct 6, 2018
1 parent 0bf6045 commit 5e3d411
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 deletions.
8 changes: 5 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

[v0.62.5](https://github.com/nextcloud/nextcloudpi/commit/ca01dbf) (2018-10-03) nc-update-nc: dont fix the news app if there is no news app
[v0.62.6](https://github.com/nextcloud/nextcloudpi/commit/d069004) (2018-10-06) nc-limits: fix PHP service restart

[v0.62.4](https://github.com/nextcloud/nextcloudpi/commit/b449e54) (2018-10-03) nc-update-nextcloud: option to upgrade to the latest version
[v0.62.5](https://github.com/nextcloud/nextcloudpi/commit/0bf6045) (2018-10-03) nc-update-nc: dont fix the news app if there is no news app

[v0.62.3, master](https://github.com/nextcloud/nextcloudpi/commit/af4b646) (2018-10-03) nc-autoupdate-nc: fix repeating notification
[v0.62.4 ](https://github.com/nextcloud/nextcloudpi/commit/aa886f9) (2018-10-03) nc-update-nextcloud: option to upgrade to the latest version

[v0.62.3 ](https://github.com/nextcloud/nextcloudpi/commit/af4b646) (2018-10-03) nc-autoupdate-nc: fix repeating notification

[v0.62.2 ](https://github.com/nextcloud/nextcloudpi/commit/6324949) (2018-10-02) nc-prettyURL: make sure URL is correct

Expand Down
11 changes: 2 additions & 9 deletions etc/ncp-config.d/nc-limits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ configure()
# RESTART PHP
[[ "$PHPTHREADS_" != "$CURRENT_THREADS" ]] || \
[[ "$MEMORYLIMIT" != "$CURRENT_PHP_MEM" ]] || \
[[ "$MAXFILESIZE_" != "$CURRENT_FILE_SIZE" ]] && {
bash -c " sleep 3
service php${PHPVER}-fpm stop
service mysql stop
sleep 0.5
service php${PHPVER}-fpm start
service mysql start
" &>/dev/null &
}
[[ "$MAXFILESIZE_" != "$CURRENT_FILE_SIZE" ]] && \
bash -c "sleep 3; service php${PHPVER}-fpm restart" &>/dev/null &

# redis max memory
local CONF=/etc/redis/redis.conf
Expand Down
7 changes: 1 addition & 6 deletions etc/ncp-config.d/nc-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ install()
[[ ! -f /.ncp-image ]] && {
systemctl restart redis-server
systemctl enable redis-server

systemctl stop php${PHPVER}-fpm
systemctl stop mysql
sleep 0.5
systemctl start php${PHPVER}-fpm
systemctl start mysql
systemctl restart php${PHPVER}-fpm
}

# service to randomize passwords on first boot
Expand Down
8 changes: 1 addition & 7 deletions etc/ncp-config.d/nc-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,7 @@ bash /usr/local/bin/nextcloud-domain.sh
# restart PHP if needed
[[ "$NEED_RESTART" == "1" ]] && \
bash -c " sleep 3
service php${PHPVER}-fpm stop
service mysql stop
sleep 0.5
service php${PHPVER}-fpm start
service mysql start
" &>/dev/null &
bash -c " sleep 3; service php${PHPVER}-fpm restart" &>/dev/null &
EOF
chmod +x /usr/local/bin/ncp-restore
}
Expand Down

0 comments on commit 5e3d411

Please sign in to comment.