1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cryptpad_ynh.git synced 2024-09-03 18:26:14 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-03-12 08:46:08 +01:00
parent 40c1547552
commit cd3c560607

View file

@ -88,6 +88,12 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================
@ -108,29 +114,15 @@ pushd "$install_dir"
ynh_exec_warn_less npm run build ynh_exec_warn_less npm run build
popd popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
env_path="$PATH"
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# ADD UPGRADED CONFIG WITH SANDBOX # ADD UPGRADED CONFIG WITH SANDBOX
#================================================= #=================================================
ynh_add_config --template="../conf/config.js" --destination="$install_dir/config/config.js" ynh_add_config --template="../conf/config.js" --destination="$install_dir/config/config.js"
chmod 600 "$install_dir/config/config.js"
chown $app "$install_dir/config/config.js"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================