mirror of
https://github.com/YunoHost-Apps/domoticz_ynh.git
synced 2024-09-03 18:26:17 +02:00
Add i2c bus access
This commit is contained in:
parent
d36702780b
commit
c7ded41b40
3 changed files with 8 additions and 4 deletions
|
@ -119,8 +119,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.)
|
#allow user to access USB / serial port to communicate with tools (RFXtrx, Z-wave dongle, etc.) & i2c bus
|
||||||
usermod -a -G dialout $app
|
usermod -a -G dialout i2c $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
|
||||||
|
|
|
@ -76,8 +76,7 @@ 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
|
||||||
|
@ -92,6 +91,9 @@ ynh_restore_file --origin_path="/etc/sudoers.d/$app"
|
||||||
#chown -R root: $final_path
|
#chown -R root: $final_path
|
||||||
#Both folder and database file must be own by app user for domoticz to work and allow internal upgrade
|
#Both folder and database file must be own by app user for domoticz to work and allow internal upgrade
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
#allow user to access USB / serial port to communicate with tools (RFXtrx, Z-wave dongle, etc.) & i2c bus
|
||||||
|
usermod -a -G dialout i2c $app
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
|
|
|
@ -174,6 +174,8 @@ ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a 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.) & i2c bus
|
||||||
|
usermod -a -G dialout i2c $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
|
||||||
|
|
Loading…
Add table
Reference in a new issue