packages/tor{,-alpha}: use a fixed predictable pid-file location (patch from Peter Wagner), remove PidFile config entry

git-svn-id: svn://svn.openwrt.org/openwrt/packages@29177 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-11-16 09:44:20 +00:00
parent a05b905d05
commit 9e91f230fd
6 changed files with 18 additions and 18 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tor-alpha
PKG_VERSION:=0.2.3.5-alpha
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=tor-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.torproject.org/dist \

View File

@ -2,15 +2,16 @@
# Copyright (C) 2006-2011 OpenWrt.org
START=50
STOP=50
SERVICE_PID_FILE=/var/run/tor/tor.pid
SERVICE_USE_PID=1
start() {
user_exists tor 52 || user_add tor 52
user_exists tor 52 || user_add tor 52 52 /var/lib/tor
group_exists tor 52 || group_add tor 52
[ -d /var/run/tor ] || {
mkdir -m 0755 -p /var/run/tor
chown tor:tor /var/run/tor
[ -f /var/run/tor.pid ] || {
touch /var/run/tor.pid
chown tor:tor /var/run/tor.pid
}
[ -d /var/lib/tor ] || {
mkdir -m 0755 -p /var/lib/tor
@ -21,7 +22,7 @@ start() {
mkdir -m 0755 -p /var/log/tor
chown tor:tor /var/log/tor
}
service_start /usr/sbin/tor
service_start /usr/sbin/tor --PidFile /var/run/tor.pid
}
stop() {

View File

@ -14,9 +14,8 @@
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.
@@ -168,3 +168,5 @@ SocksListenAddress 127.0.0.1 # accept co
@@ -168,3 +168,4 @@ SocksListenAddress 127.0.0.1 # accept co
#BridgeRelay 1
#ExitPolicy reject *:*
+User tor
+PidFile @LOCALSTATEDIR@/run/tor/tor.pid

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=tor
PKG_VERSION:=0.2.2.34
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.torproject.org/dist \

View File

@ -2,15 +2,16 @@
# Copyright (C) 2006-2011 OpenWrt.org
START=50
STOP=50
SERVICE_PID_FILE=/var/run/tor/tor.pid
SERVICE_USE_PID=1
start() {
user_exists tor 52 || user_add tor 52
user_exists tor 52 || user_add tor 52 52 /var/lib/tor
group_exists tor 52 || group_add tor 52
[ -d /var/run/tor ] || {
mkdir -m 0755 -p /var/run/tor
chown tor:tor /var/run/tor
[ -f /var/run/tor.pid ] || {
touch /var/run/tor.pid
chown tor:tor /var/run/tor.pid
}
[ -d /var/lib/tor ] || {
mkdir -m 0755 -p /var/lib/tor
@ -21,7 +22,7 @@ start() {
mkdir -m 0755 -p /var/log/tor
chown tor:tor /var/log/tor
}
service_start /usr/sbin/tor
service_start /usr/sbin/tor --PidFile /var/run/tor.pid
}
stop() {

View File

@ -14,9 +14,8 @@
## The port on which Tor will listen for local connections from Tor
## controller applications, as documented in control-spec.txt.
@@ -168,3 +168,5 @@ SocksListenAddress 127.0.0.1 # accept co
@@ -168,3 +168,4 @@ SocksListenAddress 127.0.0.1 # accept co
#BridgeRelay 1
#ExitPolicy reject *:*
+User tor
+PidFile @LOCALSTATEDIR@/run/tor/tor.pid