create user if it does not exist

This commit is contained in:
j 2015-05-04 10:55:13 +02:00
parent 956464b128
commit 80fd7c027e

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
PANDORA=${PANDORA-pandora} PANDORA=${PANDORA-pandora}
echo Installing pandora with user: $PANDORA echo Installing pandora with user: $PANDORA
getent passwd $PANDORA > /dev/null 2>&1 || adduser --disabled-password --gecos "" $PANDORA
LXC=`grep -q lxc /proc/1/environ && echo 'yes' || echo 'no'` LXC=`grep -q lxc /proc/1/environ && echo 'yes' || echo 'no'`
if [ -e /etc/os-release ]; then if [ -e /etc/os-release ]; then
. /etc/os-release . /etc/os-release