#!/bin/sh /etc/rc.common # # start dnscheck # # https://openwrt.org/docs/guide-developer/procd-init-script-example # Init sequence START=99 STOP=10 # PROCD USE_PROCD=1 start_service() { procd_open_instance dnscheck procd_set_param command /bin/sh "/usr/lib/dnscheck/dnscheck.sh" procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} procd_set_param stdout 1 # forward stdout of the command to logd procd_set_param stderr 1 # same for stderr procd_set_param pidfile /var/run/dnscheck.pid procd_close_instance } stop_service() { logger -t "dnscheck" "kresd monitoring stopped" } service_triggers() { procd_add_reload_trigger "dnscheck" } reload_service() { stop start }