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.

27 lines
610 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006 OpenWrt.org
  3. START=98
  4. STOP=10
  5. USE_PROCD=1
  6. NAME=linknx
  7. PROG=/usr/bin/$NAME
  8. . /lib/functions.sh
  9. start_service() {
  10. local conf
  11. config_load "$NAME"
  12. config_get conf args conf '/etc/linknx.xml'
  13. [ -f "$conf" ] || cp -p /etc/linknx.xml.dist "$conf"
  14. mkdir -p /tmp/$NAME/persist
  15. procd_open_instance
  16. procd_set_param command "$PROG"
  17. procd_append_param command --config="$conf" -w
  18. procd_set_param file "$conf"
  19. procd_set_param pidfile /var/run/linknx.pid
  20. procd_set_param stdout 1
  21. procd_set_param stderr 1
  22. procd_close_instance
  23. }