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.
30 lines
538 B
30 lines
538 B
3 years ago
|
#!/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
|
||
|
}
|