| # observer Starts and stops Observer daemon |
| # Source function library. |
| [ -f /etc/sysconfig/plstackobserver ] && . /etc/sysconfig/plstackobserver |
| plstackobserver=${NODEMANAGER-"python /opt/planetstack/planetstack-backend.py -d"} |
| prog="OpenCloud Observer" |
| pidfile=${PIDFILE-/var/run/plstackobserver.pid} |
| action $"Starting $prog: " daemon --pidfile=$pidfile --check=plstackobserver $plstackobserver "$@" |
| action $"Stopping $prog: " killproc -p $pidfile plstackobserver |
| status -p $pidfile plstackobserver |
| [ -f ${pidfile} ] && { stop; start $options "$@"; } |
| $plstackobserver $verboseoptions "$@" |
| echo "Restarting with $debugoptions $@ .." |
| $plstackobserver $debugoptions "$@" |
| echo $"Usage: $0 {start|stop|status|restart|condrestart|restartdebug [-d]}" |