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

Update upgrade

This commit is contained in:
Rafi59 2017-10-14 16:36:30 +02:00 committed by GitHub
parent 0349d57cb0
commit 63b0ce6740

View file

@ -97,6 +97,14 @@ ynh_add_nginx_config
# Create a system user # Create a system user
ynh_system_user_create $app ynh_system_user_create $app
#=================================================
# ADD SYSTEMD SERVICE
#=================================================
ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service"
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
ynh_add_systemd_config
#================================================= #=================================================
# INSTALL HASTEBIN # INSTALL HASTEBIN
#================================================= #=================================================
@ -110,12 +118,6 @@ DATA_PATH="/home/yunohost.app/"$app
mkdir -p $DATA_PATH mkdir -p $DATA_PATH
chown -R "$app":"$app" $final_path $DATA_PATH chown -R "$app":"$app" $final_path $DATA_PATH
#=================================================
# Configure haste with config.js file
#=================================================
ynh_replace_string "YNH_DATA_PATH" "$DATA_PATH" "$final_path/config.js"
# Verify the checksum and backup the file if it's different # Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different "$final_path/config.js" ynh_backup_if_checksum_is_different "$final_path/config.js"
@ -129,16 +131,6 @@ ynh_store_file_checksum "$final_path/config.js"
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate ynh_use_logrotate
#=================================================
# ADD SYSTEMD SERVICE
#=================================================
ynh_replace_string "__NODE__" "$nodejs_path" "../conf/systemd.service"
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
ynh_add_systemd_config
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================