snapcast/debian/snapclient.postinst
badaix 09bd4c3bf7 Remove underscore from usernames
Cleanup init scripts, use $USERNAME and $HOMDIR variables
2019-11-20 22:25:41 +01:00

20 lines
392 B
Bash

#!/bin/sh
set -e
USERNAME=snapclient
HOMEDIR=/var/lib/snapclient
if [ "$1" = configure ]; then
if ! getent passwd $USERNAME >/dev/null; then
adduser --system --quiet --group --home $HOMEDIR --no-create-home --force-badname $USERNAME
adduser $USERNAME audio
fi
if [ ! -d $HOMEDIR ]; then
mkdir -m 0750 $HOMEDIR
chown $USERNAME:$USERNAME $HOMEDIR
fi
fi
#DEBHELPER#