Skip to content

Commit c77ab6f

Browse files
author
Kristan Kenney
committed
Enable force restart of services
1 parent 20d27d1 commit c77ab6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/v-restart-service

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# Argument definition
1313
service=$1
14+
force=$2
1415

1516
# Includes
1617
source $HESTIA/func/main.sh
@@ -35,8 +36,10 @@ fi
3536

3637
if [ "$service" = "hestia" ] || [ "$service" = "iptables" ] || [ "$service" = "mariadb" ] || [ "$service" = "mysql" ] || [ "$service" = "postgresql" ] || [ "$service" = "cron" ]; then
3738
systemctl restart $service > /dev/null 2>&1
38-
else
39+
elif [ -z "$force" ] || [ "$force" = "no" ]; then
3940
systemctl reload $service > /dev/null 2>&1
41+
else
42+
systemctl restart $service > /dev/null 2>&1
4043
fi
4144

4245
#----------------------------------------------------------#

0 commit comments

Comments
 (0)