-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathhetzner_ddns.openwrt.rc
24 lines (20 loc) · 1.07 KB
/
hetzner_ddns.openwrt.rc
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
# procd init file for OpenWrt service
START=99
USE_PROCD=1
start_service() {
procd_open_instance [hetzner_ddns]
procd_set_param command /usr/bin/hetzner_ddns -d /etc/config/hetzner_ddns.conf
# respawn automatically if something died, be careful if you have an alternative process supervisor
# if process exits sooner than respawn_threshold, it is considered crashed and after 5 retries the service is stopped
# if process finishes later than respawn_threshold, it is restarted unconditionally, regardless of error code
# notice that this is literal respawning of the process, not in a respawn-on-failure sense
procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
procd_set_param limits core="0"
procd_set_param file /etc/config/hetzner_ddns.conf
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param user nobody
procd_set_param pidfile /var/run/hetzner_ddns.pid
procd_close_instance
}