From 88335c488d47c33f6b555ca05fbf58271a72b5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 27 Sep 2023 22:35:56 +0200 Subject: [PATCH] v2 --- check_process | 32 -------------------------------- scripts/install | 20 +++++--------------- scripts/upgrade | 22 ++++++---------------- 3 files changed, 11 insertions(+), 63 deletions(-) delete mode 100644 check_process diff --git a/check_process b/check_process deleted file mode 100644 index 23091f6..0000000 --- a/check_process +++ /dev/null @@ -1,32 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - project_name="YunoHost" - contact_url="https://forum.yunohost.org/t/donate-to-yunohost/9211" - logo="https://yunohost.org/user/images/logo.png" - favicon="https://yunohost.org/user/themes/yunohost-docs/images/favicon.png" - publishable_key="pk_test_gOgGjacs9YfvDJY03BRZ576O" - secret_key="sk_test_aaaaaaaaaaaaaaaaa" - prices="one_time/EUR/price_1IKuPV,recuring/EUR/price_1IKuPV" - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 1.0.1~ynh1 - upgrade=1 from_commit=5cc2d3ffd6529cc7356ff93af92dbb6785c3ab9a - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=5cc2d3ffd6529cc7356ff93af92dbb6785c3ab9a - name=1.0.1~ynh1 diff --git a/scripts/install b/scripts/install index 755f82a..71e5f14 100755 --- a/scripts/install +++ b/scripts/install @@ -42,14 +42,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=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC SETUP #================================================= @@ -95,9 +87,14 @@ ynh_store_file_checksum --file="$install_dir/settings.py" #================================================= ynh_script_progression --message="Configuring a systemd service..." --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="A simple donation form" + #================================================= # GENERIC FINALIZATION #================================================= @@ -109,13 +106,6 @@ ynh_script_progression --message="Securing files and directories..." chown -R $app:www-data $install_dir chmod o=--- $install_dir -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="A simple donation form" - #================================================= # START SYSTEMD SERVICE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 31e388f..789f894 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,20 +39,12 @@ fi chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # SPECIFIC UPGRADE #================================================= # UPGRADE PYTHON DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Installing Python dependencies..." +ynh_script_progression --message="Installing Python dependencies..." pushd $install_dir python3 -m venv venv @@ -92,9 +84,14 @@ ynh_store_file_checksum --file="$install_dir/settings.py" #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --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="A simple donation form" + #================================================= # GENERIC FINALIZATION #================================================= @@ -106,13 +103,6 @@ ynh_script_progression --message="Securing files and directories..." chown -R $app:www-data $install_dir chmod o=--- $install_dir -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="A simple donation form" - #================================================= # START SYSTEMD SERVICE #=================================================