Forráskód Böngészése

Merge pull request #519 from Lupul/backport-1.0.4

Service restart fixes backported to 1.0.4
Raphael Schneeberger 6 éve
szülő
commit
559aaeaa1c

+ 2 - 2
bin/v-restart-cron

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -55,7 +55,7 @@ fi
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 
 

+ 2 - 2
bin/v-restart-dns

@@ -42,7 +42,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -60,7 +60,7 @@ fi
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 
 

+ 2 - 2
bin/v-restart-ftp

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -55,7 +55,7 @@ fi
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 
 

+ 2 - 2
bin/v-restart-mail

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -64,7 +64,7 @@ fi
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 
 

+ 2 - 2
bin/v-restart-proxy

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -70,7 +70,7 @@ if [ -f "$HESTIA/web/inc/nginx_proxy" ]; then
 
 
     # Update restart queue
     # Update restart queue
     if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
     if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-        sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+        sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     fi
     fi
 fi
 fi
 
 

+ 5 - 0
bin/v-restart-service

@@ -40,6 +40,11 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
         "$service" = "bind9" -o     \
         "$service" = "bind9" -o     \
         "$service" = "named" -o     \
         "$service" = "named" -o     \
         "$service" = "vsftpd" -o    \
         "$service" = "vsftpd" -o    \
+        "$service" = "php5.6-fpm" -o \
+        "$service" = "php7.0-fpm" -o \
+        "$service" = "php7.1-fpm" -o \
+        "$service" = "php7.2-fpm" -o \
+        "$service" = "php7.3-fpm" -o \
         "$service" = "proftpd" -o    \
         "$service" = "proftpd" -o    \
         "$service" = "ssh" -o       \
         "$service" = "ssh" -o       \
         "$service" = "fail2ban" ]; then
         "$service" = "fail2ban" ]; then

+ 2 - 2
bin/v-restart-web

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -55,7 +55,7 @@ if [ $? -ne 0 ]; then
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#

+ 2 - 2
bin/v-restart-web-backend

@@ -37,7 +37,7 @@ fi
 
 
 # Schedule restart
 # Schedule restart
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
 if [ "$1" = 'scheduled' ] || [ -z "$1" -a "$SCHEDULED_RESTART" = 'yes' ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     echo "$BIN/$SCRIPT now" >> $HESTIA/data/queue/restart.pipe
     exit
     exit
 fi
 fi
@@ -63,7 +63,7 @@ fi
 
 
 # Update restart queue
 # Update restart queue
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
 if [ -e "$HESTIA/data/queue/restart.pipe" ]; then
-    sed -i "/$SCRIPT/d" $HESTIA/data/queue/restart.pipe
+    sed -i "/\/$SCRIPT now/d" $HESTIA/data/queue/restart.pipe
 fi
 fi
 
 
 
 

+ 3 - 3
install/upgrade/restart.sh

@@ -4,13 +4,13 @@
 for user in `ls /usr/local/hestia/data/users/`; do
 for user in `ls /usr/local/hestia/data/users/`; do
     echo "(*) Rebuilding domains and account for user: $user..."
     echo "(*) Rebuilding domains and account for user: $user..."
     if [ ! -z $WEB_SYSTEM ]; then
     if [ ! -z $WEB_SYSTEM ]; then
-        $BIN/v-rebuild-web-domains $user >/dev/null 2>&1
+        $BIN/v-rebuild-web-domains $user 'no' >/dev/null 2>&1
     fi
     fi
     if [ ! -z $DNS_SYSTEM ]; then
     if [ ! -z $DNS_SYSTEM ]; then
-        $BIN/v-rebuild-dns-domains $user >/dev/null 2>&1
+        $BIN/v-rebuild-dns-domains $user 'no' >/dev/null 2>&1
     fi
     fi
     if [ ! -z $MAIL_SYSTEM ]; then 
     if [ ! -z $MAIL_SYSTEM ]; then 
-        $BIN/v-rebuild-mail-domains $user >/dev/null 2>&1
+        $BIN/v-rebuild-mail-domains $user 'no' >/dev/null 2>&1
     fi
     fi
 done
 done