#!/bin/sh # # chkconfig: 345 91 35 # description: Starts and stops the OpenH323 gatekeeper/proxy # export PATH=/bin:/sbin:/usr/bin:/usr/sbin # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Demon specified configuration. . /etc/sysconfig/openh323proxy # Check that networking is up. if is_no "${NETWORKING}"; then msg_Network_Down openh323proxy exit 1 fi TMPDIR="/tmp"; export TMPDIR cd / # Check that openh323proxy.ini exists [ -f /etc/openh323proxy.ini ] || exit 0 case "$1" in start) if [ ! -f /var/lock/subsys/openh323proxy ]; then msg_starting "OpenH323 gatekeeper/proxy" daemon opengate_proxy -d -u nobody RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/openh323proxy else msg_Already_Running openh323proxy exit 1 fi ;; stop) if [ -f /var/lock/subsys/openh323proxy ]; then msg_stopping "OpenH323 gatekeeper" killproc opengate_proxy rm -f /var/lock/subsys/openh323proxy >/dev/null 2>&1 else msg_Not_Running openh323proxy exit 1 fi ;; status) status opengate_proxy exit $? ;; restart) $0 stop $0 start ;; reload) $0 stop $0 start ;; *) msg_Usage "$0 {start|stop|restart|reload|status}" exit 1 esac