Skip to content

Commit e796530

Browse files
author
Kristan Kenney
committed
Update service reload/restart routine
1 parent 54ff348 commit e796530

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/v-restart-service

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,23 @@ check_args '1' "$#" 'SERVICE'
2828
# Action #
2929
#----------------------------------------------------------#
3030

31-
if [ "$service" != "iptables" ]; then
31+
if [ "$service" != "iptables" ] || [ "$service" !="cron" ]; then
3232
systemctl reload $service > /dev/null 2>&1
3333
if [ $? -ne 0 ]; then
3434
check_result $E_RESTART "ERROR: Restart of $service failed."
3535
log_history "Restart of $service failed."
3636
fi
37-
else
37+
elif [ "$service" = "iptables" ]; then
3838
$BIN/v-stop-firewall
3939
$BIN/v-update-firewall
4040
if [ $? -ne 0 ]; then
4141
check_result $E_RESTART "ERROR: Restart of $service failed."
4242
log_history "Restart of $service failed."
4343
fi
44+
else
45+
systemctl restart $service > /dev/null 2>&1
4446
fi
4547

46-
4748
#----------------------------------------------------------#
4849
# Hestia #
4950
#----------------------------------------------------------#

0 commit comments

Comments
 (0)