mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 01:34:31 +04:00
recent changes in trunk allow us to specify the userid inside the openwrt makefile. the info is stored int he meta data of the IPK contorl file and users are generated by the new generic postinst trigger. Signed-off-by: John Crispin <blogic@openwrt.org>
27 lines
510 B
Bash
27 lines
510 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=50
|
|
STOP=50
|
|
|
|
USE_PROCD=1
|
|
|
|
start_service() {
|
|
[ -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
|
|
chmod 0700 /var/lib/tor
|
|
chown tor:tor /var/lib/tor
|
|
}
|
|
[ -d /var/log/tor ] || {
|
|
mkdir -m 0755 -p /var/log/tor
|
|
chown tor:tor /var/log/tor
|
|
}
|
|
procd_open_instance
|
|
procd_set_param command /usr/sbin/tor --runasdaemon 0
|
|
procd_close_instance
|
|
}
|