1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/etherpad_ynh.git synced 2024-09-03 18:36:10 +02:00
This commit is contained in:
Éric Gaspar 2023-06-27 10:06:47 +02:00
parent 87af26f98f
commit 8138534866
2 changed files with 11 additions and 60 deletions

View file

@ -36,14 +36,6 @@ ynh_setup_source --dest_dir=$install_dir
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=4
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# INSTALL ETHERPAD
#=================================================
@ -90,21 +82,12 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=4
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log"
#=================================================

View file

@ -31,7 +31,6 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
#REMOVEME? #ynh_secure_remove --file="$install_dir"
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep="$install_dir/settings.json $install_dir/credentials.json"
fi
@ -40,17 +39,6 @@ fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Upgrading dependencies..." --weight=5
if [ "$export" = "abiword" ]; then
#REMOVEME? ynh_exec_warn_less ynh_install_app_dependencies $abiword_app_depencencies
elif [ "$export" = "libreoffice" ]; then
#REMOVEME? ynh_exec_warn_less ynh_install_app_dependencies $libreoffice_app_dependencies
fi
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -59,13 +47,16 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# INSTALL DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Installing dependencies..." --weight=12
ynh_install_nodejs --nodejs_version=$nodejs_version
# Create a dedicated systemd config
ynh_add_systemd_config
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log"
#=================================================
# INSTALL ETHERPAD
#=================================================
@ -73,34 +64,11 @@ ynh_script_progression --message="Installing Etherpad..." --weight=90
pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/installDeps.sh
ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" src/bin/run.sh
#ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm cache clean --force
#ynh_exec_warn_less ynh_exec_as $app env "$ynh_node_load_PATH" npm install --upgrade
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="Collaborative editor" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================