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:
parent
7c132757e1
commit
b44d0837b7
2 changed files with 8 additions and 1 deletions
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue