1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/elasticsearch8_ynh.git synced 2024-09-03 18:26:26 +02:00
This commit is contained in:
Éric Gaspar 2024-06-14 12:25:09 +02:00 committed by Félix Piédallu
parent 97d984aed0
commit aca5337953
2 changed files with 3 additions and 31 deletions

View file

@ -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"
#=================================================

View file

@ -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"