Signed-off-by: Peter Wagner <tripolar@gmx.at>
SVN-Revision: 38135
START=50
STOP=50
-SERVICE_USE_PID=1
+USE_PROCD=1
-start() {
+start_service() {
user_exists tor 52 || user_add tor 52 52 /var/lib/tor
group_exists tor 52 || group_add tor 52
[ -f /var/run/tor.pid ] || {
mkdir -m 0755 -p /var/log/tor
chown tor:tor /var/log/tor
}
- service_start /usr/sbin/tor --PidFile /var/run/tor.pid
-}
-
-stop() {
- service_stop /usr/sbin/tor
+ procd_open_instance
+ procd_set_param command /usr/sbin/tor --runasdaemon 0
+ procd_close_instance
}