|
|
@@ -23,11 +23,16 @@ PATH="$PATH:/usr/local/sbin:/sbin:/usr/sbin:/root/bin"
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
check_args '1' "$#" 'SERVICE'
|
|
|
+service_status=$(pgrep $service)
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
# Action #
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
+if [ -z "$service_status" ]; then
|
|
|
+ force="yes"
|
|
|
+fi
|
|
|
+
|
|
|
if [ "$service" = "iptables" ]; then
|
|
|
# Run the restart rules for iptables firewall
|
|
|
$BIN/v-stop-firewall
|
|
|
@@ -38,7 +43,9 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
|
|
|
"$service" = "exim4" -o \
|
|
|
"$service" = "dovecot" -o \
|
|
|
"$service" = "bind9" -o \
|
|
|
+ "$service" = "named" -o \
|
|
|
"$service" = "vsftpd" -o \
|
|
|
+ "$service" = "proftpd" -o \
|
|
|
"$service" = "ssh" -o \
|
|
|
"$service" = "fail2ban" ]; then
|
|
|
systemctl reload $service > /dev/null 2>&1
|