1
0

crelay.init 415 B

123456789101112131415161718192021222324
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2016 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 in foreground - starts HTTP server
  14. procd_append_param command -d
  15. procd_close_instance
  16. }