diff options
author | redfish | 2020-07-03 22:57:52 -0400 |
---|---|---|
committer | redfish | 2020-07-03 22:57:52 -0400 |
commit | 4a335437692b1119f818a2b576b60a7b0b27f487 (patch) | |
tree | da2c937e550591d7526754cbd33714b7a666541b /ncdns.install | |
parent | 74a2e8f4f9ef67946076e0bd2680eeb78229cf6e (diff) | |
download | aur-4a335437692b1119f818a2b576b60a7b0b27f487.tar.gz |
add helpful config to run as non-root user
Diffstat (limited to 'ncdns.install')
-rw-r--r-- | ncdns.install | 13 |
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" +} |