mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 18:49:21 -07:00
commit
63b8ef22f6
1 changed files with 10 additions and 2 deletions
|
@ -95,13 +95,21 @@ if [ "$update" = 'yes' ] && [ "$restart" != 'no' ]; then
|
|||
|
||||
if [ "$service" = 'php' ]; then
|
||||
if [ "$WEB_SYSTEM" = "nginx" ]; then
|
||||
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d / |sed -n 1p)
|
||||
if [ $(ps --no-headers -o comm 1) == systemd ]; then
|
||||
service=$(systemctl | grep -o -E "php.*fpm.*\.service")
|
||||
service=${service//.service/}
|
||||
else
|
||||
service=$(ls /etc/init.d/php*fpm* |cut -f 4 -d /)
|
||||
fi
|
||||
else
|
||||
service=$WEB_SYSTEM
|
||||
fi
|
||||
fi
|
||||
|
||||
service $service restart >/dev/null 2>&1
|
||||
for single_service in $service; do
|
||||
service $single_service restart >/dev/null 2>&1
|
||||
done <<< "$service"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
for config in $dst; do
|
||||
cat $config.vst.back > $config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue