From 9a9d7cca48a4705e7cbcc16ef1e5c4285aa56d64 Mon Sep 17 00:00:00 2001 From: Sylvain CECCHETTO Date: Mon, 21 Oct 2019 18:20:08 +0200 Subject: [PATCH] [+] Prevent Tvheadend being upgraded throught APT (apt-mark hold) --- manifest.json | 2 +- scripts/install | 9 ++++++++- scripts/remove | 9 ++++++++- scripts/restore | 9 ++++++++- scripts/upgrade | 5 +++++ 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 41a3b25..8b37bb6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources", "fr": "Tvheadend est un serveur streaming TV pour Linux et supporte les sources d'entrées DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP et HDHomeRun" }, - "version": "4.2.8-34~ynh2", + "version": "4.2.8-34~ynh3", "url": "https://tvheadend.org", "license": "free", "maintainer": { diff --git a/scripts/install b/scripts/install index 0d6a131..bdaa297 100644 --- a/scripts/install +++ b/scripts/install @@ -167,7 +167,14 @@ ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload #================================================= -# START TVHEADEND SERVICE (H) +# PREVENT TVHEADEND BEING UPGRADED THROUGHT APT (H) +#================================================= +ynh_script_progression --message="Prevent $app being upgraded throught APT..." --weight=1 + +apt-mark hold tvheadend + +#================================================= +# START TVHEADEND SERVICE (I) #================================================= ynh_script_progression --message="Starting $app service..." --weight=1 diff --git a/scripts/remove b/scripts/remove index 19b3ea5..2a2f42e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -25,13 +25,20 @@ stream_port=$(ynh_app_setting_get --app=$app --key=stream_port) #================================================= # STANDARD REMOVE #================================================= -# STOP AND REMOVE TVHEADEND SERVICE (H) +# STOP AND REMOVE TVHEADEND SERVICE (I) #================================================= ynh_script_progression --message="Stopping $app service..." --weight=1 # Remove the dedicated systemd config ynh_remove_systemd_config +#================================================= +# UNHOLD TVHEADEND FROM APT (H) +#================================================= +ynh_script_progression --message="Diasble prevent $app being upgraded throught APT..." --weight=1 + +apt-mark unhold tvheadend + #================================================= # REMOVE SERVICE FROM ADMIN PANEL (G) #================================================= diff --git a/scripts/restore b/scripts/restore index bb432d2..eff8d44 100644 --- a/scripts/restore +++ b/scripts/restore @@ -134,7 +134,14 @@ ynh_script_progression --message="Reloading nginx web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload #================================================= -# START TVHEADEND SERVICE (G) +# PREVENT TVHEADEND BEING UPGRADED THROUGHT APT (G) +#================================================= +ynh_script_progression --message="Prevent $app being upgraded throught APT..." --weight=1 + +apt-mark hold tvheadend + +#================================================= +# START TVHEADEND SERVICE (I) #================================================= ynh_script_progression --message="Starting $app service..." --weight=1 diff --git a/scripts/upgrade b/scripts/upgrade index f65fbbc..46cff78 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -88,6 +88,11 @@ then fi +#================================================= +# PREVENT TVHEADEND BEING UPGRADED THROUGHT APT +#================================================= +apt-mark hold tvheadend + #================================================= # START SYSTEMD SERVICE #=================================================