aboutsummarylogtreecommitdiffstats
path: root/nordlayer.install
diff options
context:
space:
mode:
Diffstat (limited to 'nordlayer.install')
-rw-r--r--nordlayer.install9
1 files changed, 8 insertions, 1 deletions
diff --git a/nordlayer.install b/nordlayer.install
index 5524d0cebc7d..55394d334754 100644
--- a/nordlayer.install
+++ b/nordlayer.install
@@ -1,4 +1,5 @@
VAR_LIB=/var/lib/nordlayer
+NORDLAYER_RESOLVCONF=/usr/bin/nordlayer-resolvconf
post_install() {
@@ -6,16 +7,22 @@ post_install() {
setcap CAP_NET_BIND_SERVICE,CAP_NET_ADMIN,CAP_NET_RAW+eip /usr/bin/nordlayerd
setcap CAP_NET_BIND_SERVICE,CAP_NET_ADMIN,CAP_NET_RAW+eip /usr/bin/nordlayer-openvpn
- groupadd -r -f nordlayer
+ groupadd -r -f nordlayer
+ groupadd -r -f nordlayer-resolve
if ! id "nordlayer" >/dev/null 2>&1; then
useradd -s /usr/bin/nologin -c "Used for running NordLayer" -r -M -d /run/nordlayer -g nordlayer nordlayer
fi
+ usermod -a -G nordlayer-resolve nordlayer
+
mkdir -p ${VAR_LIB}
chmod 0770 -R ${VAR_LIB}
chown nordlayer:nordlayer -R ${VAR_LIB}
+ chown root:nordlayer-resolve ${NORDLAYER_RESOLVCONF}
+ chmod 4750 ${NORDLAYER_RESOLVCONF}
+
# Reload config
systemctl daemon-reload