Skip to content

Commit

Permalink
7730 - Expose reload actions to EL init script
Browse files Browse the repository at this point in the history
reload sends USR1 to reload agents.
reload-loglevel sends USR2 to cycle logging level.
  • Loading branch information
dcarley authored and ripienaar committed Aug 6, 2011
1 parent a755f39 commit 96ebbbf
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion mcollective.init-rh
Expand Up @@ -68,6 +68,22 @@ restart() {
start
}

reload_agents() {
echo -n "Reloading mcollective agents: "
killproc ${pidopts} ${mcollectived} -USR1
RETVAL=$?
echo
return $RETVAL
}

reload_loglevel() {
echo -n "Cycling mcollective logging level: "
killproc ${pidopts} ${mcollectived} -USR2
RETVAL=$?
echo
return $RETVAL
}

rh_status() {
status ${pidopts} ${mcollectived}
RETVAL=$?
Expand All @@ -93,11 +109,17 @@ case "$1" in
rh_status_q || exit 0
restart
;;
reload-agents)
reload_agents
;;
reload-loglevel)
reload_loglevel
;;
status)
rh_status
;;
*)
echo "Usage: mcollectived {start|stop|restart|condrestart|status}"
echo "Usage: mcollectived {start|stop|restart|condrestart|reload-agents|reload-loglevel|status}"
RETVAL=2
;;
esac
Expand Down

0 comments on commit 96ebbbf

Please sign in to comment.