From da08170f2a29a3a9e303904e44895e31f4ec3bea Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 2 Jun 2021 23:21:49 +0200 Subject: [PATCH] Fix --- check_process | 7 +------ manifest.json | 8 +++++++- scripts/install | 18 +++++++++--------- scripts/restore | 2 +- scripts/upgrade | 18 +++++++++--------- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/check_process b/check_process index caffa1b..9c72d1d 100644 --- a/check_process +++ b/check_process @@ -1,11 +1,6 @@ -# See here for more informations -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) + domain="domain.tld" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/manifest.json b/manifest.json index 09c26dd..8e3878d 100644 --- a/manifest.json +++ b/manifest.json @@ -8,13 +8,19 @@ }, "version": "1.0~ynh1", "url": "http://erdgeist.org/arts/software/opentracker/", + "upstream": { + "license": "Beerware", + "website": "http://erdgeist.org/arts/software/opentracker/", + "demo": "https://dispatch.khlieng.com/connect", + "admindoc": "http://erdgeist.org/arts/software/opentracker/" + }, "license": "Beerware", "maintainer": { "name": "liberodark", "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index f45c433..be8668e 100644 --- a/scripts/install +++ b/scripts/install @@ -61,6 +61,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=2 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -74,14 +82,6 @@ pushd $final_path ynh_exec_warn_less make popd -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # SETUP SYSTEMD #================================================= @@ -105,7 +105,7 @@ chmod +x $final_path/$app #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Bittorrent tracker" --log=systemd --needs_exposed_ports $port +yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index b989718..7d4c56b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,7 +74,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Bittorrent tracker" --log=systemd --needs_exposed_ports $port +yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 1caca11..8607eb4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,6 +48,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=5 ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=5 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -72,14 +80,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=2 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=5 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # SETUP SYSTEMD #================================================= @@ -103,7 +103,7 @@ chmod +x $final_path/$app #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Bittorrent tracker" --log=systemd --needs_exposed_ports $port +yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port" #================================================= # START SYSTEMD SERVICE