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.

26 lines
510 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. [ -f /var/run/tor.pid ] || {
  8. touch /var/run/tor.pid
  9. chown tor:tor /var/run/tor.pid
  10. }
  11. [ -d /var/lib/tor ] || {
  12. mkdir -m 0755 -p /var/lib/tor
  13. chmod 0700 /var/lib/tor
  14. chown tor:tor /var/lib/tor
  15. }
  16. [ -d /var/log/tor ] || {
  17. mkdir -m 0755 -p /var/log/tor
  18. chown tor:tor /var/log/tor
  19. }
  20. procd_open_instance
  21. procd_set_param command /usr/sbin/tor --runasdaemon 0
  22. procd_close_instance
  23. }