diff options
Diffstat (limited to 'ACE/rpmbuild/ace-tao-init-fedora/rc.d/init.d/tao-cosnaming')
-rwxr-xr-x | ACE/rpmbuild/ace-tao-init-fedora/rc.d/init.d/tao-cosnaming | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/ACE/rpmbuild/ace-tao-init-fedora/rc.d/init.d/tao-cosnaming b/ACE/rpmbuild/ace-tao-init-fedora/rc.d/init.d/tao-cosnaming new file mode 100755 index 00000000000..2722d7a58ac --- /dev/null +++ b/ACE/rpmbuild/ace-tao-init-fedora/rc.d/init.d/tao-cosnaming @@ -0,0 +1,76 @@ +#!/bin/bash +# +# chkconfig: - 80 15 +# description: Starts and stops the TAO Naming Service. +# processname: tao-cosnaming +# config: /etc/tao/tao-cosnaming.opt +# config: /etc/tao/tao-cosnaming.conf +# pidfile: /var/run/tao-cosnaming.pid + +# Source function library. +. /etc/init.d/functions + +# Source configuration options +. /etc/tao/tao-cosnaming.opt + +RETVAL=0 + +prog="tao-cosnaming" +progpath="/usr/sbin/$prog" +svcconf="/etc/tao/${prog}.conf" +lockpath="/var/lock/subsys/$prog" +pidpath="/var/run/${prog}.pid" + +start() +{ + echo -n $"Starting $prog: " + daemon --user tao $progpath -p $pidpath $OPTIONS -ORBSvcConf $svcconf -ORBDaemon + RETVAL=$? + [ "$RETVAL" = 0 ] && touch $lockpath + echo +} + +stop() +{ + echo -n $"Stopping $prog: " + killproc $progpath -TERM + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + rm -f $lockpath + rm -f $pidpath + fi + echo +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $prog + RETVAL=$? + ;; + restart) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f $lockpath ]; then + stop + start + RETVAL=$? + fi + ;; + reload) + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" + exit 1 + ;; +esac +exit $RETVAL |