This is an openwrt feed that contains definitions to include CoreDNS software into your OpenWRT build
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
openwrt-feed-coredns/net/coredns/files/coredns.init

30 lines
538 B

#!/bin/sh /etc/rc.common
# Copyright (C) 2022 Nikita Tokarchuk
START=90
USE_PROCD=1
NAME=coredns
COMMAND=/usr/sbin/$NAME
start_service() {
config_load $NAME
config_get port main port '53'
config_get config main config '/etc/coredns/Corefile'
procd_open_instance
procd_set_param command $COMMAND
procd_append_param command \
-p $port \
-conf $config
procd_set_param limits nofile=4096
procd_set_param stderr 1
procd_set_param stdout 1
procd_close_instance
}
reload_service() {
procd_send_signal $NAME
}