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.

24 lines
418 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2015 OpenWrt.org
  3. NAME=crelay
  4. START=93
  5. PROG=/usr/bin/${NAME}
  6. USE_PROCD=1
  7. # Custom relay labels (for Web GUI) are defined in /etc/crelay.conf
  8. start_service() {
  9. procd_open_instance
  10. # restart if it croaks
  11. procd_set_param respawn
  12. procd_set_param command "$PROG"
  13. # daemon mode (not daemonized) - starts HTTP server
  14. procd_append_param command -d
  15. procd_close_instance
  16. }