3 # monitor-runlevelagent starts the RunlevelAgent in production mode.
5 # Load before nm, vcached, and vservers, vserver-reference
7 # description: Start RunlevelAgent to report the current Runlevel to PLC at
10 # Stephen Soltesz <soltesz@cs.princeton.edu>
11 # Copyright (C) 2008 The Trustees of Princeton University
19 ret=$( pgrep -f -l RunlevelAgent )
20 if [[ -z $ret ]] ; then
21 echo "Starting RunlevelAgent"
22 if [[ -f RunlevelAgent.py ]] ; then
23 RLA="/usr/bin/python ./RunlevelAgent.py"
25 RLA=/usr/bin/RunlevelAgent.py
27 $RLA $args > /var/log/rla.log 2>&1 &
38 pkill -f RunlevelAgent
42 echo $"Usage: $0 {start|stop|restart|status}"