Skip to content

Instantly share code, notes, and snippets.

@xjasonlyu
Created July 15, 2019 06:02
Show Gist options
  • Select an option

  • Save xjasonlyu/13147b901c9edce8fff74e53b8b8873d to your computer and use it in GitHub Desktop.

Select an option

Save xjasonlyu/13147b901c9edce8fff74e53b8b8873d to your computer and use it in GitHub Desktop.
alpine-init-service-script
#!/sbin/openrc-run
description="the Coredns DNS server"
pidfile="/run/$RC_SVCNAME.pid"
cfgfile="/etc/$RC_SVCNAME/Corefile"
command="/usr/local/bin/coredns"
command_args="-quiet -conf=$cfgfile"
command_user="nobody"
command_background="yes"
depend() {
need net localmount
after firewall
}
start_pre() {
checkpath --file $cfgfile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment