Browse Source

Enable force restart of services

Kristan Kenney 6 years ago
parent
commit
c77ab6f51c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      bin/v-restart-service

+ 4 - 1
bin/v-restart-service

@@ -11,6 +11,7 @@
 
 # Argument definition
 service=$1
+force=$2
 
 # Includes
 source $HESTIA/func/main.sh
@@ -35,8 +36,10 @@ fi
 
 if [ "$service" = "hestia" ] || [ "$service" = "iptables" ] || [ "$service" = "mariadb" ] || [ "$service" = "mysql" ] || [ "$service" = "postgresql" ] || [ "$service" = "cron" ]; then
     systemctl restart $service > /dev/null 2>&1
-else
+elif [ -z "$force" ] || [ "$force" = "no" ]; then
     systemctl reload $service > /dev/null 2>&1
+else
+    systemctl restart $service > /dev/null 2>&1
 fi
 
 #----------------------------------------------------------#