2 groupadd -g 55 nut &> /dev/null
3 useradd -u 55 -g nut -G tty -d /var/state/ups -s /bin/false ups >/dev/null 2>&1
4 mkdir -p /var/state/ups/
5 chmod 0770 /var/state/ups/
6 chown root:nut /var/state/ups/
7 chown root:nut /etc/ups/upsd.conf /etc/ups/upsd.users /etc/ups/upsmon.conf
8 echo ">>> Before starting your UPSd daemon, you must"
9 echo ">>> edit /etc/ups/ups.conf in order to set your"
10 echo ">>> UPS driver and port."
14 userdel ups >/dev/null 2>&1
15 groupdel nut >/dev/null 2>&1
16 rm -rf /var/state/ups/