1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/domoticz_ynh.git synced 2024-09-03 18:26:17 +02:00

Add user to dialout group

This commit is contained in:
Krakinou 2020-11-25 21:51:32 +01:00
parent 026d5535c7
commit 2256e8e130
2 changed files with 5 additions and 0 deletions

View file

@ -110,6 +110,8 @@ ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user # Create a system user
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
#allow user to access USB / serial port to communicate with tools (RFXtrx, Z-wave dongle, etc.)
usermod -a -G dialout $app
#allow app user to restart service on startup #allow app user to restart service on startup
cp ../conf/sudoer ../conf/$app.conf cp ../conf/sudoer ../conf/$app.conf

View file

@ -73,6 +73,9 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app ynh_system_user_create --username=$app
#allow user to access USB / serial port to communicate with tools (RFXtrx, Z-wave dongle, etc.)
usermod -a -G dialout $app
#Restore user authorization to restart server #Restore user authorization to restart server
ynh_restore_file --origin_path="/etc/sudoers.d/$app" ynh_restore_file --origin_path="/etc/sudoers.d/$app"