[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dev-serveez] init scripts
From: |
Raimund 'Raimi' Jacob |
Subject: |
Re: [dev-serveez] init scripts |
Date: |
Mon, 29 Oct 2001 22:37:30 +0100 (CET) |
hi!
i made a 5 min draft of the serveez init script. i still have some
questions.
- where to put it in serveez cvs ? data/init.serveez ?
- create data/init.serveez.in and substitute the serveez path in it ?
> > - where to get the configuration from ? /etc/serveez.conf ?
> Yes, `/etc/serveez.conf' is ok. We can set cfg="/etc/serveez.conf"...
it's okay for the "normal" serveez to read a local cfg file.
> > - where to write the log to /var/log/serveez ? /var/tmp ?
> log="/var/log/serveez.log"
> pid="/var/log/serveez.pid"
i changed that to /var/run/serveez.pid since that's where the other
programs have the pid files.
> > - make it suse style ? optionally ?
> > (colors, rc.config support, etc.)
> Suse style would be nice to have. I actually do not know about other
> distribution of Linux and their init scripts.
i think, i dont like suse style anymore. creates some problems with other
distributions (when no rc.config is available). a discussion on a
different mailing list made me realize this.
here is the (untested, since i am lazy and it's late) script:
---[snip]---
#! /bin/sh
CFGFILE=/etc/serveez.cfg
LOGFILE=/var/log/serveez.log
PIDFILE=/var/run/serveez.pid
SERVEEZ=/sbin/serveez
VERBOSITY=0
case "$1" in
start)
echo "Starting serveez"
${SERVEEZ} -f ${CFGFILE} -l ${LOGFILE} -v ${VERBOSITY} &
echo $? > ${PIDFILE}
;;
stop)
echo "Stopping serveez"
PID=`/bin/cat ${PIDFILE} 2>/dev/null`
if [ "${PID}" = "" ]; then
echo "$0: No pid file for ${SERVEEZ}"
exit 1
fi
kill -TERM ${PID}
/bin/rm "${PIDFILE}"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
;;
esac
exit 0
---[snap]---
Bye,
Raimi
--
__/\ _/\ _____/\.___/\
/ / / /___/ ____/ __/\ Name : Raimi
/ / __/ __/ / __/ / _\/ Contact : address@hidden
/ /__/ / \/ /_/_/ /_/ Visit : http://www.lkcc.org
/________/___/\._\._____/_____/\ 3.141592653589793238462643383
\._______\.__\/__/\.____\.____\/ 27950288419716939937510582097
- [dev-serveez] init scripts, stefan, 2001/10/25
- Re: [dev-serveez] init scripts, Raimund 'Raimi' Jacob, 2001/10/25
- Re: [dev-serveez] init scripts, stefan, 2001/10/25
- Re: [dev-serveez] init scripts, Raimi 'Raimi' Jacob, 2001/10/26
- Re: [dev-serveez] init scripts, stefan, 2001/10/27
- Re: [dev-serveez] init scripts,
Raimund 'Raimi' Jacob <=
- Re: [dev-serveez] init scripts, stefan, 2001/10/30
- Re: [dev-serveez] init scripts, Raimi 'Raimi' Jacob, 2001/10/30
- Re: [dev-serveez] init scripts, stefan, 2001/10/30