crelay: Update to 0.10, refresh patches, remove daemon background call
[feed/packages.git] / utils / crelay / files / crelay.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2015 OpenWrt.org
3
4 NAME=crelay
5 START=93
6
7 PROG=/usr/bin/${NAME}
8
9 USE_PROCD=1
10
11 # Custom relay labels (for Web GUI) are defined in /etc/crelay.conf
12
13 start_service() {
14 procd_open_instance
15
16 # restart if it croaks
17 procd_set_param respawn
18
19 procd_set_param command "$PROG"
20 # daemon mode (not daemonized) - starts HTTP server
21 procd_append_param command -d
22
23 procd_close_instance
24 }