mirror of
https://github.com/YunoHost-Apps/dato_ynh.git
synced 2024-09-03 18:16:33 +02:00
Recreate config files only if app was upgraded, not if package.
This commit is contained in:
parent
f72b7a70b5
commit
3e43328c4c
1 changed files with 8 additions and 9 deletions
|
@ -67,10 +67,14 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
# Regenerate config files removed in upgrade
|
||||
ynh_script_progression --message="Regenerating dato config files..." --weight=3
|
||||
dato_setup_config_files
|
||||
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -117,13 +121,6 @@ pushd "$final_path"
|
|||
sudo -u $app env $ynh_node_load_PATH npm install --loglevel warn
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# GENERATE CONFIG FILES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Generating dato config files..." --weight=3
|
||||
|
||||
dato_setup_config_files
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -137,6 +134,8 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Verifying config files checksums..." --weight=2
|
||||
|
||||
# TODO: not sure this section is doing what it should be doing, to check
|
||||
|
||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
|
||||
ynh_backup_if_checksum_is_different --file="$final_path/config/public.js"
|
||||
|
|
Loading…
Reference in a new issue