From c6c45ae3c31550cfe5c5f4c4410afcc3cec767ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 13 May 2022 21:58:55 +0200 Subject: [PATCH] Update _common.sh (#34) * Update _common.sh * Fix --- scripts/_common.sh | 2 +- scripts/install | 7 ++++--- scripts/remove | 8 ++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7912aa4..9195d57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=14 +nodejs_version=18 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index b24ea50..b9b6f53 100755 --- a/scripts/install +++ b/scripts/install @@ -94,14 +94,15 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= # ADD SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" - +env_path="$PATH" ynh_add_systemd_config #================================================= # INSTALL HASTEBIN #================================================= +ynh_script_progression --message="Installing $app..." --weight=5 pushd "$final_path" ynh_use_nodejs @@ -111,7 +112,7 @@ popd #================================================= # CREATE DIRECTORY FOR DATA #================================================= -ynh_script_progression --message="Creating the data directory..." +ynh_script_progression --message="Creating the data directory..." --weight=1 # Define app's data directory data_path="/home/yunohost.app/${app}" diff --git a/scripts/remove b/scripts/remove index e567844..f79f779 100755 --- a/scripts/remove +++ b/scripts/remove @@ -69,15 +69,10 @@ ynh_remove_logrotate #================================================= # REMOVE HASTE BINARY #================================================= +ynh_script_progression --message="Removing various files..." --weight=1 ynh_secure_remove --file="/usr/bin/$app" -#================================================= -# REMOVE DATADIR DIRECTORY -#================================================= - -ynh_secure_remove --file="$data_path" - #================================================= # REMOVE DATA DIR #================================================= @@ -92,6 +87,7 @@ fi #================================================= # REMOVE NODEJS #================================================= +ynh_script_progression --message="Removing dependencies..." --weight=5 ynh_remove_nodejs