From ec441f586288369c38d58c0c02f84b287b71b4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 May 2024 09:23:52 +0200 Subject: [PATCH] cleaning --- manifest.toml | 4 ++-- scripts/install | 11 ----------- scripts/remove | 5 ----- scripts/upgrade | 31 +++++++++---------------------- 4 files changed, 11 insertions(+), 40 deletions(-) diff --git a/manifest.toml b/manifest.toml index b16928c..9c62377 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Tracker Bittorrent" version = "1.0~ynh4" -maintainers = ["liberodark"] +maintainers = [] [upstream] license = "Beerware" @@ -16,7 +16,7 @@ demo = "https://dispatch.khlieng.com/connect" admindoc = "http://erdgeist.org/arts/software/opentracker/" [integration] -yunohost = ">= 11.1.20" +yunohost = ">= 11.2" architectures = "all" multi_instance = false ldap = false diff --git a/scripts/install b/scripts/install index 5c8ee36..18b1f91 100644 --- a/scripts/install +++ b/scripts/install @@ -29,12 +29,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2 # Create a dedicated systemd config ynh_add_systemd_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - # Set permissions to app files chown -R $app: $install_dir chmod +x $install_dir/$app @@ -46,11 +40,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port" -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=2 - # Start a systemd service ynh_systemd_action --service_name=$app --action=start --log_path="systemd" diff --git a/scripts/remove b/scripts/remove index 7288418..8c8bdc2 100644 --- a/scripts/remove +++ b/scripts/remove @@ -22,11 +22,6 @@ then yunohost service remove $app fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2 - # Remove the dedicated systemd config ynh_remove_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index 5b72ccf..0797ec0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,18 +21,16 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$ #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=1 - ynh_secure_remove --file="$install_dir" - # Download, check integrity, uncompress and patch the source from app.src - git clone git://erdgeist.org/opentracker "$install_dir" --quiet - cp ../conf/Makefile $install_dir/Makefile - cp ../conf/opentracker.conf.sample $install_dir/opentracker.conf - pushd $install_dir - ynh_exec_warn_less make - popd +ynh_secure_remove --file="$install_dir" +# Download, check integrity, uncompress and patch the source from app.src +git clone git://erdgeist.org/opentracker "$install_dir" --quiet +cp ../conf/Makefile $install_dir/Makefile +cp ../conf/opentracker.conf.sample $install_dir/opentracker.conf +pushd $install_dir + ynh_exec_warn_less make +popd fi #================================================= @@ -66,11 +58,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description="Bittorrent tracker" --log="systemd" --needs_exposed_ports="$port" -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=2 - ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log" #=================================================