mirror of
https://github.com/YunoHost-Apps/haste_ynh.git
synced 2024-09-03 20:36:28 +02:00
parent
dc8d70c514
commit
c6c45ae3c3
3 changed files with 7 additions and 10 deletions
|
@ -4,7 +4,7 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nodejs_version=14
|
nodejs_version=18
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -94,14 +94,15 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD SYSTEMD SERVICE
|
# 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
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL HASTEBIN
|
# INSTALL HASTEBIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing $app..." --weight=5
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
@ -111,7 +112,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DIRECTORY FOR DATA
|
# 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
|
# Define app's data directory
|
||||||
data_path="/home/yunohost.app/${app}"
|
data_path="/home/yunohost.app/${app}"
|
||||||
|
|
|
@ -69,15 +69,10 @@ ynh_remove_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE HASTE BINARY
|
# REMOVE HASTE BINARY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing various files..." --weight=1
|
||||||
|
|
||||||
ynh_secure_remove --file="/usr/bin/$app"
|
ynh_secure_remove --file="/usr/bin/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE DATADIR DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_secure_remove --file="$data_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DATA DIR
|
# REMOVE DATA DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -92,6 +87,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NODEJS
|
# REMOVE NODEJS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing dependencies..." --weight=5
|
||||||
|
|
||||||
ynh_remove_nodejs
|
ynh_remove_nodejs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue