#!/bin/sh

addgroup -S zigbee2mqtt 2>/dev/null
adduser -S -D -H -h /var/lib/zigbee2mqtt -s /sbin/nologin -G zigbee2mqtt -g zigbee2mqtt zigbee2mqtt 2>/dev/null

# Zigbee USB dongle is exposed as /dev/ttyACME* and this dev node is owned by
# the "dialout" group by default.
addgroup zigbee2mqtt dialout

exit 0
