[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mldonkey-users] Is it safe to stop mldonkey with kill SIG_INT
From: |
Roland Arendes |
Subject: |
Re: [Mldonkey-users] Is it safe to stop mldonkey with kill SIG_INT |
Date: |
Tue, 4 Mar 2003 09:37:54 +0100 |
hi address@hidden,
am Dienstag, 4. März 2003 um 09:33 schriebst du:
slgpo> I am still working on the packaging of mldonkey. It should be ended in
the
slgpo> next day.
slgpo> For the init script i need to know if it is safe to kill mldonkey by
sending
slgpo> a kill -15 ( SIG_INT ) to mldonkey. Does it closes all and save the
slgpo> configuration ?
Don't know, but this works as expected:
--
#!/bin/sh
MLDONKEY_PATH=/home/donkey/mldonkey/build
case "$1" in
start)
if [ -n "`/sbin/pidof mldonkey`" ]; then
echo "mlDonkey already running.."
else
cd $MLDONKEY_PATH
nice -10 ./mldonkey >log 2>errlog &
echo "mlDonkey started.."
fi
;;
stop)
if [ -n "`/sbin/pidof mldonkey`" ]; then
kill -INT `/sbin/pidof mldonkey`
echo -n "mlDonkey contacted .. "
while [ -n "`/sbin/pidof mldonkey`" ]; do
sleep 2
echo -n "."
done
echo "stopped."
else
echo
echo "No mlDonkey found to kill."
fi
;;
restart)
$0 stop && $0 start
;;
reconnect)
if [ -n "`/sbin/pidof mldonkey`" ]; then
kill -HUP `/sbin/pidof mldonkey`
echo "mlDonkey contacted for reconnection."
else
echo
echo "No mlDonkey found to contact for reconnection."
fi
;;
status)
echo -n "Checking mldonkey: "
checkproc mldonkey && echo OK || echo No process
;;
*)
echo "Usage: $0 {start|stop|restart|reconnect|status}"
exit 1
;;
esac
----
-roland