8 if [ -z "$desc" ]; then
12 # action stop implies quiet mode and check disabling
13 if [ "$action" = "stop" ]; then
22 if [ -f /var/lock/subsys/$service ]; then
24 if [ "$noop" = 1 ]; then
28 /sbin/service $service $action 1>&2 || :;
32 if [ "$quiet" != 1 ]; then
35 echo 'Run "/sbin/service $service start" to start $desc.'
43 # include check function
44 skip_auto_restart_body() {
47 [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
48 [ -f /etc/sysconfig/$service ] && . /etc/sysconfig/$service
49 echo \${RPM_SKIP_AUTO_RESTART:-no}
55 if [ "$check" = 1 ]; then
56 skip_auto_restart_body
57 echo 'if [ $(skip_auto_restart) = no ]; then'
60 # service restart was disabled, tell them to restart it
62 if [ -f /var/lock/subsys/$service ]; then
63 echo 'Run "/sbin/service $service restart" to restart $desc.'
73 # for testing - no syntax errors allowed
74 rpm -E '%service monit restart' | sh
75 rpm -E '%service monit restart -q' | sh
76 rpm -E '%service monit stop' | sh
77 rpm -E '%service monit stop -q' | sh
78 rpm -E '%service monit stop "Monit Daemon"' | sh
79 rpm -E '%service monit stop "Monit Daemon" -q' | sh
80 rpm -E '%service monit restart "Monit Daemon"' | sh
81 rpm -E '%service monit restart -q "Monit Daemon"' | sh
82 rpm -E '%service monit reload "Monit Daemon"' | sh
83 rpm -E '%service monit reload -q "Monit Daemon"' | sh
84 rpm -E '%{service monit reload "Monit Daemon"} date' | sh
85 rpm -E '%{service monit reload "Monit Daemon" -q} date' | sh
86 rpm -E '%{service -n monit restart "Monit Daemon" } date' | sh