From bf7fbad807da6e4460343d8d8546c19f662847ab Mon Sep 17 00:00:00 2001 From: ewilly Date: Tue, 4 Jan 2022 14:24:35 +0100 Subject: [PATCH] Fix mynh_user_create --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7262df2..5c467fc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,9 +16,9 @@ PY_REQUIRED_VERSION=3.9.2 # Create homeassistant user mynh_user_create () { USER_GROUPS="" - [ $(ynh_system_group_exists --group=dialout) ] && USER_GROUPS="${USER_GROUPS} dialout" - [ $(ynh_system_group_exists --group=gpio) ] && USER_GROUPS="${USER_GROUPS} gpio" - [ $(ynh_system_group_exists --group=i2c) ] && USER_GROUPS="${USER_GROUPS} i2c" + [ $(getent group dialout) ] && USER_GROUPS="${USER_GROUPS} dialout" + [ $(getent group gpio) ] && USER_GROUPS="${USER_GROUPS} gpio" + [ $(getent group i2c) ] && USER_GROUPS="${USER_GROUPS} i2c" ynh_system_user_create --username="$app" --groups="$USER_GROUPS" }