libmicrohttpd: build parallel
[feed/packages.git] / net / bind / files / named.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2014 Noah Meyerhans <frodo@morgul.net>
3 # Licensed under the terms of the GNU General Public License version 2
4 # or (at your discretion) any later later version
5
6 USE_PROCD=1
7
8 START=50
9
10 config_file=/etc/bind/named.conf
11 pid_file=/var/run/named/named.pid
12
13 logdir=/var/log/named/
14 cachedir=/var/cache/bind
15 libdir=/var/lib/bind
16 config_file=/etc/bind/named.conf
17
18 fix_perms() {
19 for dir in $libdir $logdir $cachedir; do
20 test -e "$dir" || {
21 mkdir -p "$dir"
22 chgrp bind "$dir"
23 chmod g+w "$dir"
24 }
25 done
26 }
27
28 start_service() {
29 user_exists bind 57 || user_add bind 57
30 group_exists bind 57 || group_add bind 57
31 fix_perms
32 procd_open_instance
33 procd_set_param command /usr/sbin/named -u bind -f -c $config_file
34 procd_set_param respawn
35 procd_close_instance
36 }