Commit f7626fa4 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Re-implemented as ../src/server/komrunning.c.

parent 748eb820
#!/bin/sh
# Start and stop LysKOM
# Copyright (C) 1994 Lysator Academic Computer Association.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
case "$1"x in
x)
if [ -f @ETCDIR@/status ]
then
if [ ! -f @ETCDIR@/pid ]
then
echo 'LysKOM is probably DOWN (pid file not found)'
elif kill -0 `cat @ETCDIR@/pid`
then
echo 'LysKOM is going down'
ps u`cat @ETCDIR@/pid` || echo 'Apparently just died.'
else
echo 'LysKOM is DOWN'
fi
ls -l @ETCDIR@/status
else
if [ ! -f @ETCDIR@/pid ]
then
echo 'LysKOM is probably going up (pid file not found)'
elif kill -0 `cat @ETCDIR@/pid`
then
echo 'LysKOM is UP'
ps u`cat @ETCDIR@/pid` || echo 'Apparently just died.'
else
echo 'LysKOM is going up'
fi
fi;;
onx|upx|startx)
rm -f @ETCDIR@/status;;
offx|downx|shutdownx)
whoami > @ETCDIR@/status
if [ -f @ETCDIR@/pid ]
then
kill -HUP `cat @ETCDIR@/pid` 2>/dev/null
fi;;
esac
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment