1
0

cjdns.init 509 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh /etc/rc.common
  2. START=90
  3. STOP=85
  4. USE_PROCD=1
  5. start_service()
  6. {
  7. [ -f /etc/uci-defaults/cjdns ] && ( . /etc/uci-defaults/cjdns )
  8. procd_open_instance
  9. procd_set_param respawn
  10. procd_set_param command /bin/ash -c "cjdrouteconf get | tee /tmp/etc/cjdroute.conf | cjdroute --nobg | logger -t cjdns"
  11. procd_close_instance
  12. }
  13. stop_service()
  14. {
  15. killall cjdroute
  16. }
  17. reload_service()
  18. {
  19. # cat /tmp/etc/cjdroute.conf | cjdrouteconf reload
  20. restart
  21. }
  22. service_triggers()
  23. {
  24. procd_add_reload_trigger cjdns
  25. }