1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moodle_ynh.git synced 2024-09-03 19:46:23 +02:00

Apply example_ynh

This commit is contained in:
yalh76 2022-06-28 21:57:31 +02:00
parent 51dc524df3
commit 929f820e94
2 changed files with 5 additions and 2 deletions

View file

@ -108,12 +108,16 @@ domain=${new_domain%/}
path=${new_path%/}
dir="__DIR__"
ynh_backup_if_checksum_is_different --file="$final_path/config.php"
if [ "$new_path" == "/" ]; then
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
else
ynh_add_config --template="../conf/config-path.php" --destination="$final_path/config.php"
fi
ynh_store_file_checksum --file="$final_path/config.php"
#=================================================
# RELOAD NGINX
#=================================================

View file

@ -20,7 +20,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading settings..." --weight=1
ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -59,7 +59,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"