We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34db3fd commit a539421Copy full SHA for a539421
bin/v-restart-service
@@ -29,6 +29,7 @@ service_status=$(pgrep $service)
29
# Action #
30
#----------------------------------------------------------#
31
32
+# Restart service if not running instead of trying to reload
33
if [ -z "$service_status" ]; then
34
force="yes"
35
fi
@@ -48,8 +49,10 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
48
49
"$service" = "proftpd" -o \
50
"$service" = "ssh" -o \
51
"$service" = "fail2ban" ]; then
52
+ sleep 1
53
systemctl reload $service > /dev/null 2>&1
54
else
55
56
systemctl restart $service > /dev/null 2>&1
57
58
0 commit comments