mirror of
https://github.com/openwrt/packages.git
synced 2025-02-07 09:19:51 +00:00
900e71b607
Signed-off-by: Antonio Pastor <antonio.pastor@gmail.com>
25 lines
534 B
Bash
Executable File
25 lines
534 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=94
|
|
|
|
USE_PROCD=1
|
|
PROG=/usr/sbin/timelord
|
|
|
|
start_service() {
|
|
config_load timelord
|
|
|
|
config_get disabled timelord disabled '0'
|
|
[ "$disabled" = "0" ] || {
|
|
logger -p info -t timelord "Disabled by config" && exit
|
|
}
|
|
config_get nbpname timelord nbpname
|
|
[ -z "$nbpname" ] || nbpname="-n $nbpname"
|
|
config_get localtime timelord localtime
|
|
[ -z "$localtime" ] || localtime="-l"
|
|
|
|
procd_open_instance
|
|
procd_set_param command $PROG -d $localtime $nbpname
|
|
procd_set_param respawn
|
|
procd_close_instance
|
|
}
|