Merge branch 'testing' into ci-auto-update-2.0.1

This commit is contained in:
Éric Gaspar 2024-07-22 21:12:31 +02:00
commit a7bd666883
4 changed files with 4 additions and 34 deletions

View file

@ -22,17 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
# SYSTEM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================

View file

@ -46,6 +46,7 @@ ynh_script_progression --message="Setting up source files and building the app..
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:$app" "$install_dir"
@ -61,7 +62,7 @@ chown -R "$app:$app" "$install_dir"
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.yaml" --destination="$install_dir/config.yaml"
ynh_add_config --template="config.yaml" --destination="$install_dir/config.yaml"
chmod 400 "$install_dir/config.yaml"
chown "$app:$app" "$install_dir/config.yaml"

View file

@ -22,43 +22,18 @@ then
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
ynh_remove_nodejs
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing synapse app service..." --weight=6
# Remove a directory securely
ynh_secure_remove --file="/etc/matrix-$synapse_instance/app-service/$app.yaml"
"/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh" || ynh_die --message="Synapse can't restart with the appservice configuration"
# Remove the log files
ynh_secure_remove --file="/var/log/$app"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -76,7 +76,7 @@ print(yaml.dump(c['ircService']['servers']))")
### Same as during install
ynh_add_config --template="../conf/config.yaml" --destination="$install_dir/config.yaml"
ynh_add_config --template="config.yaml" --destination="$install_dir/config.yaml"
# Try to recover the previously configured IRC servers.
python3 -c "import yaml