summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2008-07-17 23:48:39 +0000
committerPeter Palfrader <peter@palfrader.org>2008-07-17 23:48:39 +0000
commit9cd1852d1ada64716e47133c4cacbd8f922bdf0c (patch)
tree57ef5109967d1760dc6a625dd7a4b9e8a71f6af3
parent813dc8f494de666eb72cafb7dea8b758f4b0d57b (diff)
downloadtor-9cd1852d1ada64716e47133c4cacbd8f922bdf0c.tar.gz
tor-9cd1852d1ada64716e47133c4cacbd8f922bdf0c.zip
Stop requiring that the binary in /usr/sbin/tor is still the same as the one
that actually is the running tor when we try to stop or reload the daemon using the init script. If the process is called tor, running as debian-tor, and the pid file agrees to then it probably is the Tor you want to stop (closes: #491246). svn:r16035
-rw-r--r--debian/changelog10
-rw-r--r--debian/tor.init10
2 files changed, 16 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index 56671806c7..45c626eb74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+tor (0.2.0.30-2) unstable; urgency=low
+
+ * Stop requiring that the binary in /usr/sbin/tor is still the same as the
+ one that actually is the running tor when we try to stop or reload the
+ daemon using the init script. If the process is called tor, running as
+ debian-tor, and the pid file agrees to then it probably is the Tor you
+ want to stop (closes: #491246).
+
+ -- Peter Palfrader <weasel@debian.org> Fri, 18 Jul 2008 01:46:26 +0200
+
tor (0.2.0.30-1) unstable; urgency=low
* New upstream version.
diff --git a/debian/tor.init b/debian/tor.init
index a798c0cdf2..99c550a881 100644
--- a/debian/tor.init
+++ b/debian/tor.init
@@ -22,6 +22,8 @@ NAME=tor
DESC="tor daemon"
TORPIDDIR=/var/run/tor
TORPID=$TORPIDDIR/tor.pid
+DAEMON_USER=debian-tor
+DAEMON_NAME=tor
DEFAULTSFILE=/etc/default/$NAME
WAITFORDAEMON=60
ARGS=""
@@ -144,12 +146,12 @@ case "$1" in
exit 0
fi
- if start-stop-daemon --stop --signal INT --quiet --pidfile $TORPID --exec $DAEMON; then
+ if start-stop-daemon --stop --signal INT --quiet --pidfile $TORPID --name $DAEMON_NAME --user $DAEMON_USER; then
wait_for_deaddaemon $pid
echo "$NAME."
elif kill -0 $pid 2>/dev/null
then
- echo "FAILED (Is $pid not $NAME? Is $DAEMON a different binary now?)."
+ echo "FAILED (Is $pid not $NAME?)."
else
echo "FAILED ($DAEMON died: process $pid not running; or permission denied)."
fi
@@ -165,12 +167,12 @@ case "$1" in
check_config
- if start-stop-daemon --stop --signal 1 --quiet --pidfile $TORPID --exec $DAEMON
+ if start-stop-daemon --stop --signal 1 --quiet --pidfile $TORPID --name $DAEMON_NAME --user $DAEMON_USER
then
echo "$NAME."
elif kill -0 $pid 2>/dev/null
then
- echo "FAILED (Is $pid not $NAME? Is $DAEMON a different binary now?)."
+ echo "FAILED (Is $pid not $NAME?)."
else
echo "FAILED ($DAEMON died: process $pid not running; or permission denied)."
fi