Skip to content

Commit ec8d8aa

Browse files
committed
cleanup v-restart-service
1 parent abe9301 commit ec8d8aa

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

bin/v-restart-service

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ check_args '1' "$#" 'SERVICE'
2828
# Action #
2929
#----------------------------------------------------------#
3030

31-
# Run the restart rules for iptables firewall
3231
if [ "$service" = "iptables" ]; then
32+
# Run the restart rules for iptables firewall
3333
$BIN/v-stop-firewall
3434
$BIN/v-update-firewall
35-
fi
36-
37-
if [ "$service" = "hestia" ] || [ "$service" = "iptables" ] || [ "$service" = "mariadb" ] || [ "$service" = "mysql" ] || [ "$service" = "postgresql" ] || [ "$service" = "cron" ]; then
38-
systemctl restart $service > /dev/null 2>&1
39-
elif [ -z "$force" ] || [ "$force" = "no" ]; then
35+
elif [ -z "$force" -o "$force" = "no" ] && [ \
36+
"$service" = "nginx" -o \
37+
"$service" = "apache2" -o \
38+
"$service" = "exim4" -o \
39+
"$service" = "dovecot" -o \
40+
"$service" = "bind9" -o \
41+
"$service" = "vsftpd" -o \
42+
"$service" = "ssh" -o \
43+
"$service" = "fail2ban" ]; then
4044
systemctl reload $service > /dev/null 2>&1
4145
else
4246
systemctl restart $service > /dev/null 2>&1

0 commit comments

Comments
 (0)