1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00

Add more groups to user

This commit is contained in:
Sylvain 2024-04-01 20:15:45 +02:00
parent 7c132757e1
commit b44d0837b7
2 changed files with 8 additions and 1 deletions

View file

@ -5,7 +5,7 @@ name = "Home Assistant"
description.en = "Home automation platform"
description.fr = "Plateforme domotique"
version = "2024.3.3~ynh1"
version = "2024.3.3~ynh2"
maintainers = ["ewilly"]

View file

@ -189,4 +189,11 @@ myynh_set_permissions () {
[ ! -e "$(dirname "$log_file")" ] || chown -R $app: "$(dirname "$log_file")"
[ ! -e "/etc/sudoers.d/$app" ] || chown -R root: "/etc/sudoers.d/$app"
# Upgade user groups
user_groups=""
[ $(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"
}