1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/meilisearch_ynh.git synced 2024-09-03 19:45:59 +02:00

Cleaning up

This commit is contained in:
ericgaspar 2020-10-06 10:26:30 +02:00
parent 3193a45aaa
commit adb788162e
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 18 additions and 18 deletions

View file

@ -70,4 +70,4 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for Meilisearch. (YunoHost will then actually copy those files to the archive)." --time --last
ynh_print_info --message="Backup script completed for Meilisearch. (YunoHost will then actually copy those files to the archive)."

View file

@ -74,7 +74,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
# DOWNLOAD AND INSTALL MEILISEARCH
#=================================================
ynh_script_progression --message="Installing meilisearch..." --weight=5
ynh_script_progression --message="Installing Meilisearch..." --weight=5
arch=$(ynh_detect_arch)
@ -147,7 +147,7 @@ yunohost service add $app --description "Opensource next generation search API"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
@ -163,7 +163,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --time --weight=1
ynh_script_progression --message="Configuring SSOwat..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]

View file

@ -62,7 +62,7 @@ ynh_restore_file --origin_path="$final_path"
# RESTORE Meilisearch
#=================================================
ynh_script_progression --message="Download again binary for the API." --time --weight=5
ynh_script_progression --message="Download again binary for the API." --weight=5
arch=$(ynh_detect_arch)

View file

@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading installation settings..." --time --weight=1
ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -34,7 +34,7 @@ upgrade_type=$(ynh_check_app_version_changed)
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
@ -55,7 +55,7 @@ fi
# FIND AND OPEN A PORT
#=================================================
ynh_script_progression --message="Configuring firewall..." --time --weight=1
ynh_script_progression --message="Configuring firewall..." --weight=2
# Find an available port
port=$(ynh_find_port --port=8095)
@ -64,7 +64,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up Meilisearch before upgrading (may take a while)..." --time --weight=1
ynh_script_progression --message="Backing up Meilisearch before upgrading (may take a while)..." --weight=5
# Backup the current version of the app
ynh_backup_before_upgrade
@ -93,7 +93,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2
# Create a dedicated NGINX config
ynh_add_nginx_config
@ -101,7 +101,7 @@ ynh_add_nginx_config
#=================================================
# UPGRADING MEILISEARCH
#=================================================
ynh_script_progression --message="upgrading Meilisearch..." --time --weight=1
ynh_script_progression --message="upgrading Meilisearch..." --weight=5
arch=$(ynh_detect_arch)
@ -117,7 +117,7 @@ mv "$release_file" /usr/bin/meilisearch
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
@ -133,7 +133,7 @@ ynh_store_file_checksum --file="$final_path/CONFIG_FILE"
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --time --weight=1
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=2
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
@ -141,7 +141,7 @@ ynh_use_logrotate --non-append
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --time --weight=1
ynh_script_progression --message="Configuring a systemd service..." --weight=2
if [ $allow_analyse ]; then
ynh_replace_string "__ANALYTICS__" "false" "../conf/systemd.service"
@ -174,7 +174,7 @@ chown -R $app:$app $final_path
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." --time --weight=1
ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1
# Make app public if necessary
if [ $is_public -eq 1 ]
@ -186,14 +186,14 @@ fi
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --time --weight=1
ynh_script_progression --message="Starting a systemd service..." --weight=3
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
@ -201,4 +201,4 @@ ynh_systemd_action --service_name=nginx --action=reload
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Upgrade of Meilisearch completed" --time --last
ynh_script_progression --message="Upgrade of Meilisearch completed" --last