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