diff --git a/scripts/backup b/scripts/backup index 251bb1b..e6e6343 100755 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/install b/scripts/install index 7500bd4..eb8e4f6 100755 --- a/scripts/install +++ b/scripts/install @@ -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" diff --git a/scripts/remove b/scripts/remove index 3f5340a..fa53de4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index be9c23f..5358c0d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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