]> git.pld-linux.org Git - packages/omniORB.git/blame - omniORB.init
- formatting
[packages/omniORB.git] / omniORB.init
CommitLineData
474bc0c3
MM
1#!/bin/sh
2#
46cde02d 3# omniORB: Starts omniORB
474bc0c3
MM
4#
5# chkconfig: 345 85 15
6# description: This is a daemon which handles CORBA connections for \
7# example for 3dwm.
8# processname: omniNames
9# config: /etc/omniORB.cfg
10#
11
12# Sanity checks.
13[ -f /etc/omniORB.cfg ] || exit 0
14
15# Source function library.
16. /etc/rc.d/init.d/functions
17
18# Get sysconfig
19[ -f /etc/sysconfig/omniORB ] && . /etc/sysconfig/omniORB
46cde02d 20
2355d147 21RETVAL=0
474bc0c3
MM
22# See how we were called.
23case "$1" in
46cde02d 24 start)
474bc0c3
MM
25 if [ ! -f /var/lock/subsys/omniORB ]; then
26 msg_starting "omniNames for omniORB"
45d5984a 27 if [ -f "/var/log/omniORB/omninames-$(hostname).log" ]; then
474bc0c3
MM
28 START=
29 else
30 START=-start
31 fi
32 daemon "sh -c 'omniNames $START -errlog /var/log/omniORB/omninames-err.log &'"
33 RETVAL=$?
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/omniORB
35 else
36 msg_already_running "omniNames for omniORB"
474bc0c3 37 fi
46cde02d 38 ;;
39 stop)
474bc0c3
MM
40 if [ -f /var/lock/subsys/omniORB ]; then
41 msg_stopping "omniNames for omniORB"
42 killproc omniNames
43 rm -f /var/lock/subsys/omniORB >/dev/null 2>&1
44 else
46cde02d 45 msg_not_running "omniNames for omniORB"
474bc0c3
MM
46 fi
47 ;;
48 status)
46cde02d 49 status omniNames
2355d147 50 exit $?
46cde02d 51 ;;
2355d147 52 restart|force-reload)
46cde02d 53 $0 stop
54 $0 start
2355d147 55 exit $?
46cde02d 56 ;;
57 *)
2355d147 58 msg_usage "$0 {start|stop|restart|force-reload|status}"
59 exit 3
474bc0c3
MM
60esac
61
62exit $RETVAL
This page took 0.061423 seconds and 4 git commands to generate.