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:
parent
51dc524df3
commit
929f820e94
2 changed files with 5 additions and 2 deletions
|
@ -108,12 +108,16 @@ domain=${new_domain%/}
|
||||||
path=${new_path%/}
|
path=${new_path%/}
|
||||||
dir="__DIR__"
|
dir="__DIR__"
|
||||||
|
|
||||||
|
ynh_backup_if_checksum_is_different --file="$final_path/config.php"
|
||||||
|
|
||||||
if [ "$new_path" == "/" ]; then
|
if [ "$new_path" == "/" ]; then
|
||||||
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
|
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
|
||||||
else
|
else
|
||||||
ynh_add_config --template="../conf/config-path.php" --destination="$final_path/config.php"
|
ynh_add_config --template="../conf/config-path.php" --destination="$final_path/config.php"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ynh_store_file_checksum --file="$final_path/config.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,7 +20,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading settings..." --weight=1
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
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"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
# Restore permissions on app files
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue