mirror of
https://github.com/novatiq/packages.git
synced 2026-06-29 08:40:23 +01:00
5bce9c3e1d
Note: In some cases when tor daemon starts before than the router is connected to the Internet. Tor will exit and you have to run it manually. This should fix this case. Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
24 lines
421 B
Bash
24 lines
421 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=50
|
|
STOP=50
|
|
|
|
USE_PROCD=1
|
|
|
|
start_service() {
|
|
touch /var/run/tor.pid
|
|
chown tor:tor /var/run/tor.pid
|
|
|
|
mkdir -m 0700 -p /var/lib/tor
|
|
chown -R tor:tor /var/lib/tor
|
|
|
|
mkdir -m 0755 -p /var/log/tor
|
|
chown -R tor:tor /var/log/tor
|
|
|
|
procd_open_instance
|
|
procd_set_param command /usr/sbin/tor --runasdaemon 0
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|