summaryrefslogtreecommitdiff
path: root/community/unbound/install
diff options
context:
space:
mode:
Diffstat (limited to 'community/unbound/install')
-rw-r--r--community/unbound/install18
1 files changed, 18 insertions, 0 deletions
diff --git a/community/unbound/install b/community/unbound/install
new file mode 100644
index 000000000..34e7026d1
--- /dev/null
+++ b/community/unbound/install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group unbound &>/dev/null || groupadd -r unbound >/dev/null
+ getent passwd unbound &>/dev/null || useradd -r -g unbound -d /etc/unbound -s /bin/false -c unbound unbound >/dev/null
+ cat <<EOF
+==> Start with: /etc/rc.d/unbound start
+==> Then, add "nameserver 127.0.0.1" to /etc/resolv.conf.head
+EOF
+}
+
+pre_remove() {
+ /etc/rc.d/unbound stop
+}
+
+post_remove() {
+ getent passwd unbound &>/dev/null && userdel unbound >/dev/null
+ getent group unbound &>/dev/null && groupdel unbound >/dev/null
+ return 0
+}