mirror of
https://github.com/YunoHost-Apps/mosquitto_ynh.git
synced 2024-09-03 19:45:54 +02:00
Fix permissions due to the system user being handled by the deb package too
This commit is contained in:
parent
fe74e56182
commit
95ea253f91
3 changed files with 11 additions and 4 deletions
|
@ -29,6 +29,9 @@ ynh_add_config --template="passwd" --destination="/etc/mosquitto/passwd"
|
||||||
mosquitto_passwd -U "/etc/mosquitto/passwd"
|
mosquitto_passwd -U "/etc/mosquitto/passwd"
|
||||||
ynh_store_file_checksum --file="/etc/mosquitto/passwd"
|
ynh_store_file_checksum --file="/etc/mosquitto/passwd"
|
||||||
|
|
||||||
|
# Hard coded username because deb package creates the user
|
||||||
|
chown -R "mosquitto" "/etc/mosquitto"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -24,14 +24,15 @@ yunohost service add "$app" --description="Allows MQTT clients to send/receive d
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring various files..." --weight=1
|
ynh_script_progression --message="Restoring various files..." --weight=1
|
||||||
|
|
||||||
# Restore the passwd file
|
ynh_restore_file --origin_path="/etc/mosquitto/conf.d/default.conf"
|
||||||
ynh_restore_file --origin_path="/etc/mosquitto/passwd"
|
ynh_restore_file --origin_path="/etc/mosquitto/passwd"
|
||||||
|
|
||||||
# Restore the config file
|
|
||||||
ynh_restore_file --origin_path="/etc/mosquitto/conf.d/default.conf"
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/var/log/$app/"
|
ynh_restore_file --origin_path="/var/log/$app/"
|
||||||
|
|
||||||
|
# Hard coded username because deb package creates the user
|
||||||
|
chown -R "mosquitto" "/etc/mosquitto"
|
||||||
|
chown -R "mosquitto" "/var/log/$app/"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -44,6 +44,9 @@ ynh_add_config --template="passwd" --destination="/etc/mosquitto/passwd"
|
||||||
mosquitto_passwd -U "/etc/mosquitto/passwd"
|
mosquitto_passwd -U "/etc/mosquitto/passwd"
|
||||||
ynh_store_file_checksum --file="/etc/mosquitto/passwd"
|
ynh_store_file_checksum --file="/etc/mosquitto/passwd"
|
||||||
|
|
||||||
|
# Hard coded username because deb package creates the user
|
||||||
|
chown -R "mosquitto" "/etc/mosquitto"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue