Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37411709
en ru br
ALT Linux repos
S:4.3.0-alt3
5.0: 4.1.3-alt1
4.1: 4.1.2-alt1
4.0: 4.1.0-alt12.1
3.0: 4.0.5-alt2

Group :: Networking/Remote access
RPM: libomniORB

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# omniNames This shell script takes care of loading omniNames
# for i.e. 3Dwm server
#
# chkconfig: 2345 80 30
#
# description: Lauching omniNames server.
#
# (c) MandrakeSoft, Lenny Cartier <lenny@mandrakesoft.com>
#
# config: /etc/omniORB.cfg

# Source function library.
. /etc/init.d/functions

RETVAL=0

OMNILOG=/var/log/omniORB/omninames-$HOSTNAME.log
LOCKFILE=/var/lock/subsys/omninames
ERRORLOG=/var/log/omniORB/omninames-error.log
USER=daemon

# Source networking configuration.
# Check that networking is up.
SourceIfNotEmpty /etc/sysconfig/network || exit 1
is_yes "$NETWORKING" || exit 1

SourceIfExists /etc/sysconfig/omninames

# Default server address and port
[ -z $NAMES_ADDR ] && NAMES_ADDR=127.0.0.1
[ -z $NAMES_PORT ] && NAMES_PORT=2810

start()
{
echo -n "Starting omniNames daemon: "
if [ -f "$OMNILOG" ]
then
start_daemon --no-announce --user "$USER" -- /usr/bin/omniNames -errlog $ERRORLOG -ORBendPoint giop:tcp:$NAMES_ADDR:$NAMES_PORT "&"
else
start_daemon --no-announce --user "$USER" -- /usr/bin/omniNames -start -errlog $ERRORLOG -ORBendPoint giop:tcp:$NAMES_ADDR:$NAMES_PORT "&"
fi
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch "$LOCKFILE"
return $RETVAL
}

stop()
{
echo -n "Stopping omniNames daemon: "
stop_daemon --no-announce /usr/bin/omniNames
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f "$LOCKFILE"
return $RETVAL
}

restart()
{
stop
start
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
status)
status omniNames
RETVAL=$?
;;
*)
echo "Usage: ${0##*/} {start|stop|reload|restart|condstop|condrestart|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin