1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opentracker_ynh.git synced 2024-09-03 19:46:34 +02:00
This commit is contained in:
Éric Gaspar 2024-05-16 09:23:52 +02:00
parent 0f4e0176f8
commit ec441f5862
4 changed files with 11 additions and 40 deletions

View file

@ -7,7 +7,7 @@ description.fr = "Tracker Bittorrent"
version = "1.0~ynh4" version = "1.0~ynh4"
maintainers = ["liberodark"] maintainers = []
[upstream] [upstream]
license = "Beerware" license = "Beerware"
@ -16,7 +16,7 @@ demo = "https://dispatch.khlieng.com/connect"
admindoc = "http://erdgeist.org/arts/software/opentracker/" admindoc = "http://erdgeist.org/arts/software/opentracker/"
[integration] [integration]
yunohost = ">= 11.1.20" yunohost = ">= 11.2"
architectures = "all" architectures = "all"
multi_instance = false multi_instance = false
ldap = false ldap = false

View file

@ -29,12 +29,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to app files # Set permissions to app files
chown -R $app: $install_dir chown -R $app: $install_dir
chmod +x $install_dir/$app 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" 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 # Start a systemd service
ynh_systemd_action --service_name=$app --action=start --log_path="systemd" ynh_systemd_action --service_name=$app --action=start --log_path="systemd"

View file

@ -22,11 +22,6 @@ then
yunohost service remove $app yunohost service remove $app
fi fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config

View file

@ -9,12 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -27,10 +21,8 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
ynh_secure_remove --file="$install_dir" ynh_secure_remove --file="$install_dir"
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
git clone git://erdgeist.org/opentracker "$install_dir" --quiet git clone git://erdgeist.org/opentracker "$install_dir" --quiet
@ -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" 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" ynh_systemd_action --service_name=$app --action=start --log_path="/var/log/$app/$app.log"
#================================================= #=================================================