ancient-weatherstation/debian/weatherstation-weatherd.pos...

18 lines
481 B
Bash

#!/bin/sh
#DEBHELPER#
if ! getent passwd weatherstation >/dev/null 2>&1; then
echo -n "Creating user/group 'weatherstation'" >&2
adduser --quiet --system --group --no-create-home \
--disabled-password --disabled-login \
--shell /bin/false \
weatherstation
adduser weatherstation dialout
echo "."
fi
# Fixperms:
/bin/chown weatherstation:weatherstation /etc/weatherstation/weatherd.conf
/bin/chmod 440 /etc/weatherstation/weatherd.conf