diff --git a/scripts/backup b/scripts/backup index c6be9d6..79da68a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,23 +28,13 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="$data_dir" --is_big #================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/logrotate.d/$app" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/etc/sysctl.d/90-max_map_count-elasticsearch.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index ccc78e5..27eeb50 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -24,24 +18,12 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=20 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=20 - - # Download, check integrity, uncompress and patch the source from app.src - # The keep option prevents this warning: - # "File .... has been manually modified since the installation or last upgrade." - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/elasticsearch.yml" -fi +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/elasticsearch.yml" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir"