Merge pull request #17 from nxshock/patch-1

Run service as separate user
This commit is contained in:
Revertron
2021-04-03 18:52:11 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -72,6 +72,8 @@ EOF
cat > /tmp/$PKGNAME/debian/postinst << EOF
#!/bin/sh
id -u alfis &>/dev/null || useradd --system alfis || echo "Failed to create user 'alfis' - please create it manually and reinstall"
if ! getent group alfis 2>&1 > /dev/null; then
groupadd --system --force alfis || echo "Failed to create group 'alfis' - please create it manually and reinstall"
fi
@@ -125,4 +127,4 @@ ar -r $PKGFILE \
/tmp/$PKGNAME/control.tar.gz \
/tmp/$PKGNAME/data.tar.gz
rm -rf /tmp/$PKGNAME
rm -rf /tmp/$PKGNAME