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.

25 lines
552 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2015 OpenWrt.org
  3. START=50
  4. STOP=10
  5. USE_PROCD=1
  6. PROG=/usr/lib/gnunet/libexec/gnunet-service-arm
  7. CONFIGFILE=/var/run/gnunet/gnunet.conf
  8. start_service() {
  9. if [ ! -e /var/run/gnunet ]; then
  10. mkdir -p /var/run/gnunet
  11. chmod 0750 /var/run/gnunet
  12. chown gnunet:gnunet /var/run/gnunet
  13. touch $CONFIGFILE
  14. chown gnunet:gnunet $CONFIGFILE
  15. chmod 0600 $CONFIGFILE
  16. fi
  17. procd_open_instance
  18. procd_set_param user gnunet
  19. procd_set_param command $PROG -c $CONFIGFILE
  20. procd_set_param respawn
  21. procd_close_instance
  22. }