[cvsnt] Lockserver on Linux
Glen Starrett
grstarrett at cox.net
Thu Jan 29 06:12:31 GMT 2004
Torsten Martinsen wrote:
> I'm using LockServer, started from a script in /etc/init.d. I made
> this script by hacking the "skeleton" script provided by the Debian
> install.
>
OK, I put together one for my RH9 system. I'd appreciate
[any|every]one's comments / corrections or even just a confirmation that
I did it right. There seems to be very thin documentation on how those
files are put together from what I could find -- probably because of all
the options / distros possible.
I based it off of a couple scripts that were present. One thing I don't
know how to do is grab the config information from /etc/cvsnt/PServer
and take the LockServerPort setting (does the Lock Server check the
config file LockServer setting??)
Tony--I assume that you've changed the lock server setting location to
the main config file for 2.0.23, is that correct? It has been removed
from the config file, but I'm not sure if it was the last upgrade that
removed it or not.
Also, there's no mention of the PServer in the man files. Not that I
don't know where to go for advice, mind you :)
--------------------
Glen Starrett
#!/bin/bash
#
# Init file for CVSNT Lock Server daemon
#
# chkconfig: 345 60 50
# description: CVSNT Lock Server daemon
#
# processname: cvslockd
# config: /etc/cvsnt/PServer
# pidfile: /var/run/cvslockd.pid
# source function library
. /etc/rc.d/init.d/functions
RETVAL=0
prog="cvslockd"
cvslockd="/usr/local/bin/cvslockd"
start()
{
echo -n $"Starting $prog:"
daemon $cvslockd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
return $RETVAL
}
stop()
{
echo -n $"Stopping $prog:"
killproc $cvslockd -TERM
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/$prog ] ; then
stop
start
RETVAL=$?
fi
;;
status)
status $prog
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
More information about the cvsnt
mailing list