diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index 866dba1..215ab02 100755 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -39,11 +39,6 @@ mkdir -p /tmp/$PKGNAME/ mkdir -p /tmp/$PKGNAME/debian/ mkdir -p /tmp/$PKGNAME/usr/bin/ mkdir -p /tmp/$PKGNAME/etc/systemd/system/ -mkdir -p /tmp/$PKGNAME/usr/lib/sysusers.d/ - -cat > /tmp/$PKGNAME/usr/lib/sysusers.d/alfis.sysusers << EOF -u alfis - "alfis user" -EOF cat > /tmp/$PKGNAME/debian/changelog << EOF Please see https://github.com/Revertron/Alfis/ @@ -77,6 +72,8 @@ EOF cat > /tmp/$PKGNAME/debian/postinst << EOF #!/bin/sh +id -u somename &>/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