Skip to content
Snippets Groups Projects
Commit 3d44dd2f authored by Peter Palfrader's avatar Peter Palfrader
Browse files

Finally apply Peter Eisentraut's patch for tor's init script to support status as an argument

parent 06b59ec5
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,10 @@ tor (0.2.2.9-alpha-1) experimental; urgency=low
* 0.2.2.4-alpha failed to ship test.h so we had included it in the
debian diff. The upstream bug has long since been fixed so we should
probably stop shipping our own copy of test.h
* Finally apply Peter Eisentraut's patch for tor's init script to support
status as an argument (closes: #526371).
-- Peter Palfrader <weasel@debian.org> Sat, 27 Feb 2010 16:33:22 +0100
-- Peter Palfrader <weasel@debian.org> Sat, 27 Feb 2010 16:36:48 +0100
tor (0.2.2.8-alpha-1) experimental; urgency=low
......
......@@ -182,8 +182,26 @@ case "$1" in
sleep 1
$0 start
;;
status)
if test ! -r $(dirname $TORPID); then
echo "cannot read tor PID file"
exit 4
fi
pid=`cat $TORPID 2>/dev/null` || true
if test ! -f $TORPID -o -z "$pid"; then
echo "tor is not running"
exit 3
fi
if ps "$pid" >/dev/null 2>&1; then
echo "tor is running"
exit 0
else
echo "tor is not running"
exit 1
fi
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $0 {start|stop|restart|reload|force-reload|status}" >&2
exit 1
;;
esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment