File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,16 @@ PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
2323# ----------------------------------------------------------#
2424
2525check_args ' 1' " $# " ' SERVICE'
26+ service_status=$( pgrep $service )
2627
2728# ----------------------------------------------------------#
2829# Action #
2930# ----------------------------------------------------------#
3031
32+ if [ -z " $service_status " ]; then
33+ force=" yes"
34+ fi
35+
3136if [ " $service " = " iptables" ]; then
3237 # Run the restart rules for iptables firewall
3338 $BIN /v-stop-firewall
@@ -38,7 +43,9 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
3843 " $service " = " exim4" -o \
3944 " $service " = " dovecot" -o \
4045 " $service " = " bind9" -o \
46+ " $service " = " named" -o \
4147 " $service " = " vsftpd" -o \
48+ " $service " = " proftpd" -o \
4249 " $service " = " ssh" -o \
4350 " $service " = " fail2ban" ]; then
4451 systemctl reload $service > /dev/null 2>&1
You can’t perform that action at this time.
0 commit comments