1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dendrite_ynh.git synced 2024-09-03 18:25:58 +02:00

Restore user before any chmod command

This commit is contained in:
tituspijean 2022-08-25 14:46:08 +02:00
parent a18dba43d3
commit dce305c26b
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -46,6 +46,14 @@ test ! -d $final_path \
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path" --groups="ssl-cert"
#=================================================
# RESTORE ALL CONFIG AND DATA
#=================================================
@ -56,14 +64,6 @@ chown -R $app:root /var/log/$app
ynh_restore
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path" --groups="ssl-cert"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================