doorparty-server/init

29 lines
624 B
Plaintext
Raw Permalink Normal View History

2021-03-15 12:25:50 +00:00
#!/bin/bash
GROUP=doorparty
GID=1000
USERS=/etc/doorparty-connector.users
set -e
export PATH=$PATH:${SBBSEXEC}
if [ -r ${USERS} ]; then
if ! grep -qe ^${GROUP}: /etc/group; then
groupadd -g ${GID} ${GROUP}
fi
cat ${USERS} | while read line; do
user=$(echo ${line}|awk -F: '{print $1}')
if ! grep -qe ^${user}: /etc/passwd; then
echo "+ Adding Door Party User: ${user}"
useradd -c "Door Party User" -g ${GROUP} -MN -s /usr/sbin/nologin ${user}
echo -n $line | chpasswd
fi
done
2021-04-24 13:44:08 +00:00
([ -d /run/sshd ] || mkdir /run/sshd) && /usr/sbin/sshd
2021-03-15 12:25:50 +00:00
fi
exec /sbin/doorparty-connector /etc/doorparty-connector.ini