diff --git a/scripts/install b/scripts/install index af3effd..023c7dc 100755 --- a/scripts/install +++ b/scripts/install @@ -122,8 +122,8 @@ chown -R $app:$app "$final_path" ynh_script_progression --message="Building Node dependencies..." --weight=30 pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install popd #================================================= @@ -156,17 +156,6 @@ chown $app:$app "$base_config_path" chmod 600 "$user_config_path" chown $app:$app "$user_config_path" -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$app_service_registration_path/$app.yaml" - -# Probably not worth anymore, because the overrides should -# be now in $user_config_path -# ynh_store_file_checksum --file="$base_config_path" - #================================================= # SETUP SYSTEMD #================================================= @@ -208,6 +197,14 @@ cp "$final_path/$app.yaml" $app_service_registration_path/$app.yaml /opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \ || ynh_die "Synapse can't restart with the appservice configuration" +#================================================= +# STORE THE CONFIG FILE CHECKSUM +#================================================= + +# Calculate and store the config file checksum into the app settings +ynh_store_file_checksum --file="$app_service_registration_path/$app.yaml" + + #================================================= # SEND A README FOR THE ADMIN #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3284ae6..5c8e940 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,10 +107,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression --message="Upgrading source files..." --weight=1 - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" --keep="run.sh" fi chmod 750 "$final_path" @@ -132,8 +132,8 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_script_progression --message="Building Node dependencies..." --weight=3 pushd "$final_path" - ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install popd #=================================================