summarylogtreecommitdiffstats
path: root/ncdns.install
diff options
context:
space:
mode:
Diffstat (limited to 'ncdns.install')
-rw-r--r--ncdns.install13
1 files changed, 13 insertions, 0 deletions
diff --git a/ncdns.install b/ncdns.install
new file mode 100644
index 000000000000..898edcaae2df
--- /dev/null
+++ b/ncdns.install
@@ -0,0 +1,13 @@
+post_install() {
+ # We do create a dedicated user, but by default the default service will
+ # run the daemon as root, because that's the only way to bind to :53 (which
+ # is a desirable default). Eventually, hopefully, upstream will provide a
+ # priviledge drop feature.
+ getent passwd ncdns &>/dev/null || {
+ echo -n ">>> Creating ncdns user... "
+ useradd --system --user-group -m --home /var/lib/ncdns ncdns
+ echo "done"
+ } # NOTE: we do not autoremove user due to security concerns (Arch policy)
+
+ echo ">>> Edit the configuration file before starting service: /etc/ncdns.conf"
+}