1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/haste_ynh.git synced 2024-09-03 20:36:28 +02:00

Update _common.sh (#34)

* Update _common.sh

* Fix
This commit is contained in:
Éric Gaspar 2022-05-13 21:58:55 +02:00 committed by GitHub
parent dc8d70c514
commit c6c45ae3c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 10 deletions

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES
#=================================================
nodejs_version=14
nodejs_version=18
#=================================================
# PERSONAL HELPERS

View file

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

View file

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