You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
421 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. START=50
  4. STOP=50
  5. USE_PROCD=1
  6. start_service() {
  7. touch /var/run/tor.pid
  8. chown tor:tor /var/run/tor.pid
  9. mkdir -m 0700 -p /var/lib/tor
  10. chown -R tor:tor /var/lib/tor
  11. mkdir -m 0755 -p /var/log/tor
  12. chown -R tor:tor /var/log/tor
  13. procd_open_instance
  14. procd_set_param command /usr/sbin/tor --runasdaemon 0
  15. procd_set_param respawn
  16. procd_close_instance
  17. }