blob: b7c5123d9514930b464db64b89289ad29c10a014 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh /etc/rc.common
# Copyright (C) 2016 OpenWrt.org
NAME=crelay
START=93
PROG=/usr/bin/${NAME}
USE_PROCD=1
# Custom relay labels (for Web GUI) are defined in /etc/crelay.conf
start_service() {
procd_open_instance
# restart if it croaks
procd_set_param respawn
procd_set_param command "$PROG"
# daemon mode in foreground - starts HTTP server
procd_append_param command -d
procd_close_instance
}
|