From 8da92f578838410b228dc8b4a1c8877d62e8bb9f Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Mon, 5 Feb 2024 20:08:46 +0100 Subject: [PATCH] add extra protection for perseus group --- debian/openwebrx.postinst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/openwebrx.postinst b/debian/openwebrx.postinst index e78b4630..a7e0a513 100755 --- a/debian/openwebrx.postinst +++ b/debian/openwebrx.postinst @@ -15,7 +15,10 @@ case "$1" in usermod -aG plugdev "${OWRX_USER}" # ensure group exists first (dependency is optional) - addgroup --system --quiet perseususb + # addgroup will error out if the group exists, but is not a system group. it doesn't matter for the intended purpose, but we need extra protection for this case. + if [ ! $(getent group perseususb) ]; then + addgroup --system --quiet perseususb + fi usermod -aG perseususb "${OWRX_USER}" # create OpenWebRX data directory and set the correct permissions