diff --git a/README.md b/README.md index 692fe0e..15628a4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ You can use it to easily collaborate on notes, graphs and even presentations in - Easy to use permission system - Low system requirements -**Shipped version:** 1.9.7~ynh3 +**Shipped version:** 1.9.8~ynh1 **Demo:** https://demo.hedgedoc.org/ diff --git a/README_fr.md b/README_fr.md index 569a67c..1ed5ab4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ You can use it to easily collaborate on notes, graphs and even presentations in - Easy to use permission system - Low system requirements -**Version incluse :** 1.9.7~ynh3 +**Version incluse :** 1.9.8~ynh1 **Démo :** https://demo.hedgedoc.org/ diff --git a/manifest.toml b/manifest.toml index c8d75f4..14fddb0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "HedgeDoc" description.en = "Collaborative editor to work on notes written in Markdown" description.fr = "Éditeur collaboratif pour travailler sur des notes en Markdown" -version = "1.9.7~ynh3" +version = "1.9.8~ynh1" maintainers = ["eric_G"] @@ -17,7 +17,7 @@ admindoc = "https://docs.hedgedoc.org/" code = "https://github.com/hedgedoc/hedgedoc" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = true ldap = true @@ -45,8 +45,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/hedgedoc/hedgedoc/releases/download/1.9.7/hedgedoc-1.9.7.tar.gz" - sha256 = "c9bd99c65cf45fa1d7808855b46abbfa13b24400254d8da5e81dae2965494bb3" + url = "https://github.com/hedgedoc/hedgedoc/releases/download/1.9.8/hedgedoc-1.9.8.tar.gz" + sha256 = "dca402c47804b7b2ac0a2bcf715b8e570a9e617c87c150f5ff2a2b35b764c349" autoupdate.strategy = "latest_github_tag" [resources.ports] diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..9195d57 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=16 +nodejs_version=18 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 795873a..a48110b 100644 --- a/scripts/install +++ b/scripts/install @@ -51,12 +51,10 @@ chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 -# Create a dedicated NGINX config ynh_add_nginx_config -# Create a dedicated systemd config ynh_add_systemd_config yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" diff --git a/scripts/remove b/scripts/remove index dbd13c5..159acb6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null @@ -22,27 +23,10 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - -# Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - ynh_remove_nodejs -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5 - -# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index eee9898..f41173e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -9,15 +9,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -48,32 +39,22 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name #================================================= # RESTORE SYSTEMD #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." --weight=5 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" #================================================= -# START SYSTEMD SERVICE +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fc592db..b67cf3e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,28 +70,27 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -# Create a dedicated nginx config ynh_add_nginx_config -# Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -# Create a dedicated systemd config ynh_add_systemd_config +yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" + #============================================== # INSTALL HEDGEDOC #============================================== if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Building HedgeDoc... (this will take some time and resources!)" --weight=20 + ynh_script_progression --message="Building $app... (this will take some time and resources!)" --weight=20 -pushd "$install_dir" + pushd "$install_dir" ynh_secure_remove /usr/local/share/.cache/yarn ynh_use_nodejs ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --frozen-lockfile @@ -99,13 +98,6 @@ pushd "$install_dir" popd fi -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 - -yunohost service add $app --description="Collaborative Markdown editor" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #=================================================