[Avcheck] kavdaemon init Skript
Ralf Hildebrandt
Ralf.Hildebrandt@innominate.com
Wed, 15 Aug 2001 15:30:43 +0200
--BOhpupldhMlYbdva
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Aug 15, 2001 at 04:56:27PM +0400, Michael Tokarev wrote:
> I'm sorry I have no time now (and wow, i installing drweb right now! ;)
Changes applied to the new script; attached
--
Ralf.Hildebrandt@innominate.com innominate AG
+49.(0)30.308806-62 fax: -77 networking people
To rephrase, spam is not the answer. Spam is the question. Death is
not the answer, but pretty close to it.
--BOhpupldhMlYbdva
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=kavdaemon
#! /bin/sh
#
# startup/shutdown script for kavdaemon for use with avpcheck.c
#
DAEMONNAME=kavdaemon
DAEMON=/var/spool/avp/kavdaemon
if [ -f /var/spool/avp/ctl/AvpPid ]; then
PID=`cat /var/spool/avp/ctl/AvpPid`;
else
PID="";
fi
# Start or stop based upon the first argument to the script.
case $1 in
start)
cd /var/spool/avp
chmod 644 bases/*
chmod 755 bases
/usr/bin/env - HOME=/ \
/var/spool/avp/uchroot -u avpd /var/spool/avp \
./$DAEMONNAME -dl -MP -V -f=/ctl /tst
echo "$DAEMONNAME: (re)started."
;;
restart | reload)
$0 stop
$0 start
;;
stop)
if test "$PID" != ""; then
kill $PID && \
echo "$DAEMONNAME: stopped."
else
echo "$DAEMONNAME: is not running."
fi
sleep 2
;;
status)
if test "$PID" != ""; then
echo "$DAEMONNAME: is running."
else
echo "$DAEMONNAME: is not running."
fi
;;
*)
echo "Usage: $DAEMONNAME {reload|restart|start|status|stop}"
exit 1
;;
esac
exit 0
--BOhpupldhMlYbdva--