mirror of
https://github.com/YunoHost-Apps/minidlna_ynh.git
synced 2024-09-03 19:36:34 +02:00
Don't use backport anymore (the app is in main source list now)
This commit is contained in:
parent
913099f778
commit
e71dfdc173
12 changed files with 17 additions and 195 deletions
|
@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
|
||||
MiniDLNA is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.
|
||||
|
||||
**Shipped version:** Debian repositories versions. Currently 1.1.6 and 1.2.1
|
||||
**Shipped version:** Debian repositories versions. Currently 1.2.1
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/inst
|
|||
|
||||
MiniDLNA est un simple serveur multimédia, dont le but est d'être entièrement compatible avec les clients DLNA/UPnP-AV.
|
||||
|
||||
**Version embarquée :** Versions des dépôts Debian. Actuellement 1.1.6 et 1.2.1
|
||||
**Version embarquée :** Versions des dépôts Debian. Actuellement 1.2.1
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
[install_standard]
|
||||
name = "Install the version from stable repository"
|
||||
command = "/bin/bash scripts/actions/install_standard"
|
||||
|
||||
[install_backports]
|
||||
name = "Install the version from backports repository"
|
||||
command = "/bin/bash scripts/actions/install_backports"
|
||||
|
||||
[reset_db]
|
||||
name = "Reinitialise the database"
|
||||
command = "/bin/bash scripts/actions/reset_db"
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
;; Test paquet stable
|
||||
; Manifest
|
||||
version="A. Version of the Debian repositories - recommended"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=0
|
||||
|
@ -10,24 +8,11 @@
|
|||
setup_public=0
|
||||
upgrade=1
|
||||
upgrade=1 from_commit=2c107b09144c9829be5cc94b202d0f766b2a0db4
|
||||
upgrade=1 from_commit=7fa6b0a84e0cb24cd5a26d2f5d64f68875862f42
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=1 (48200)
|
||||
change_url=0
|
||||
;; Test paquet backports
|
||||
; Manifest
|
||||
version="B. Latest version available for Debian"
|
||||
; Checks
|
||||
setup_sub_dir=0
|
||||
setup_root=0
|
||||
setup_nourl=1
|
||||
setup_private=0
|
||||
setup_public=0
|
||||
upgrade=1
|
||||
backup_restore=0
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
|
@ -37,3 +22,6 @@ Notification=down
|
|||
; commit=2c107b09144c9829be5cc94b202d0f766b2a0db4
|
||||
name=01 May 2017 2c107b09144c9829be5cc94b202d0f766b2a0db4
|
||||
manifest_arg=version=A. Version of the Debian repositories - recommended&
|
||||
; commit=7fa6b0a84e0cb24cd5a26d2f5d64f68875862f42
|
||||
name=20 Jun 2019 7fa6b0a84e0cb24cd5a26d2f5d64f68875862f42
|
||||
manifest_arg=version=B. Latest version available for Debian&
|
||||
|
|
|
@ -23,16 +23,6 @@
|
|||
"multi_instance": false,
|
||||
"services": [],
|
||||
"arguments": {
|
||||
"install" : [
|
||||
{
|
||||
"name": "version",
|
||||
"ask": {
|
||||
"en": "Select the MiniDLNA version to install",
|
||||
"fr": "Choix de la version de MiniDLNA à installer"
|
||||
},
|
||||
"choices": ["A. Version of the Debian repositories - recommended", "B. Latest version available for Debian"],
|
||||
"default": "A. Version of the Debian repositories - recommended"
|
||||
}
|
||||
]
|
||||
"install" : []
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
app=${YNH_APP_INSTANCE_NAME:-$YNH_APP_ID}
|
||||
|
||||
#=================================================
|
||||
# CHECK IF ARGUMENTS ARE CORRECT
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# CHECK IF AN ACTION HAS TO BE DONE
|
||||
#=================================================
|
||||
|
||||
if [ -e /etc/apt/sources.list.d/minidlna.list ]
|
||||
then
|
||||
ynh_die --message="You are already using the version from backports repository." --ret_code=0
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC ACTION
|
||||
#=================================================
|
||||
# RE-INSTALL MINIDLNA FROM BACKPORTS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Re-installing MiniDLNA from backports..." --weight=9
|
||||
|
||||
# Remove the current version of minidlna
|
||||
ynh_package_remove minidlna
|
||||
|
||||
# Then install the version from backports
|
||||
codename=$(ynh_get_debian_release)
|
||||
test -z "$codename" && (ynh_die --message="codename empty")
|
||||
|
||||
ynh_replace_string --match_string="__CODENAME__" --replace_string="$codename" --target_file=/etc/yunohost/apps/$app/conf/minidlna.list
|
||||
cp -a /etc/yunohost/apps/$app/conf/minidlna.list /etc/apt/sources.list.d/
|
||||
ynh_apt update
|
||||
ynh_package_install -t $codename-backports minidlna
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Execution completed" --last
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# CHECK IF ARGUMENTS ARE CORRECT
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# CHECK IF AN ACTION HAS TO BE DONE
|
||||
#=================================================
|
||||
|
||||
if [ ! -e /etc/apt/sources.list.d/minidlna.list ]
|
||||
then
|
||||
ynh_die --message="You are already using the version from the stable repository." --ret_code=0
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC ACTION
|
||||
#=================================================
|
||||
# RE-INSTALL MINIDLNA FROM STABLE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Re-installing MiniDLNA from stable..." --weight=9
|
||||
|
||||
# Remove the current version of minidlna
|
||||
ynh_package_remove minidlna
|
||||
ynh_secure_remove --file="/etc/apt/sources.list.d/minidlna.list"
|
||||
|
||||
ynh_apt update
|
||||
ynh_package_install minidlna
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Execution completed" --last
|
|
@ -23,22 +23,11 @@ ynh_print_info --message="Loading installation settings..."
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
version=$(ynh_app_setting_get --app=$app --key=version)
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP OF THE APT SOURCE
|
||||
#=================================================
|
||||
|
||||
if [ $version = "B" ]
|
||||
then
|
||||
ynh_backup --src_path="/etc/apt/sources.list.d/minidlna.list"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP OF INOTIFY'S CONFIG
|
||||
#=================================================
|
||||
|
|
|
@ -20,8 +20,6 @@ ynh_abort_if_errors
|
|||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
||||
#=================================================
|
||||
|
||||
version="$YNH_APP_ARG_VERSION"
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
#=================================================
|
||||
|
@ -29,8 +27,6 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||
|
||||
ynh_app_setting_set --app=$app --key=version --value=${version:0:1}
|
||||
|
||||
ynh_app_setting_set --app=$app --key=overwrite_settings --value=1
|
||||
ynh_app_setting_set --app=$app --key=admin_mail_html --value=1
|
||||
|
||||
|
@ -72,19 +68,7 @@ ynh_multimedia_build_main_dir
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing MiniDLNA..." --weight=45
|
||||
|
||||
if [ ${version:0:1} = "B" ]
|
||||
then
|
||||
# Install the backport version. (If you have issues with the standard version from the stable repository)
|
||||
ynh_replace_string --match_string="__CODENAME__" --replace_string="$codename" --target_file=../conf/minidlna.list
|
||||
cp -a ../conf/minidlna.list /etc/apt/sources.list.d/
|
||||
ynh_apt update
|
||||
ynh_package_install -t $codename-backports minidlna
|
||||
else
|
||||
# Install the standard version from debian repository
|
||||
ynh_apt update
|
||||
ynh_package_install minidlna
|
||||
fi
|
||||
ynh_app_setting_set --app=$app --key=version --value=${version:0:1}
|
||||
ynh_add_app_dependencies --package=minidlna
|
||||
|
||||
#=================================================
|
||||
# INCREASE INOTIFY'S LIMITS
|
||||
|
|
|
@ -46,8 +46,7 @@ ynh_exec_fully_quiet yunohost firewall disallow UDP 1900
|
|||
#=================================================
|
||||
ynh_script_progression --message="Removing MiniDLNA..." --weight=6
|
||||
|
||||
ynh_apt purge minidlna
|
||||
ynh_secure_remove --file="/etc/apt/sources.list.d/minidlna.list"
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE INOTIFY'S CONFIG
|
||||
|
|
|
@ -23,7 +23,6 @@ ynh_script_progression --message="Loading settings..."
|
|||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
version=$(ynh_app_setting_get --app=$app --key=version)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
|
||||
#=================================================
|
||||
|
@ -49,19 +48,7 @@ ynh_multimedia_build_main_dir
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing MiniDLNA" --weight=45
|
||||
|
||||
if [ ${version:0:1} = "B" ]
|
||||
then
|
||||
# Install the backport version. (If you have issues with the standard version from the stable repository)
|
||||
codename=$(ynh_get_debian_release)
|
||||
ynh_restore_file --origin_path="/etc/apt/sources.list.d/minidlna.list"
|
||||
ynh_replace_string --match_string=" [a-z]*-backports" --replace_string=" $codename-backports" --target_file=/etc/apt/sources.list.d/minidlna.list
|
||||
ynh_apt update
|
||||
ynh_package_install -t $codename-backports minidlna
|
||||
else
|
||||
# Install the standard version from debian repository
|
||||
ynh_apt update
|
||||
ynh_package_install minidlna
|
||||
fi
|
||||
ynh_add_app_dependencies --package=minidlna
|
||||
|
||||
#=================================================
|
||||
# RESTORE INOTIFY'S CONFIG
|
||||
|
|
|
@ -51,6 +51,12 @@ if [ -z "$friendly_name" ]; then
|
|||
ynh_app_setting_set --app=$app --key=friendly_name --value=$friendly_name
|
||||
fi
|
||||
|
||||
# If version exists, remove the backport source list, as it's no longer used.
|
||||
if [ -n "$version" ]; then
|
||||
ynh_secure_remove --file="/etc/apt/sources.list.d/minidlna.list"
|
||||
ynh_app_setting_delete --app=$app --key=version
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
@ -77,19 +83,7 @@ ynh_multimedia_build_main_dir
|
|||
#=================================================
|
||||
ynh_script_progression --message="Upgrading MiniDLNA..." --weight=3
|
||||
|
||||
if [ $version = "B" ]
|
||||
then
|
||||
# Install the backport version. (If you have issues with the standard version from the stable repository)
|
||||
codename=$(ynh_get_debian_release)
|
||||
ynh_replace_string --match_string="__CODENAME__" --replace_string="$codename" --target_file=../conf/minidlna.list
|
||||
cp -a ../conf/minidlna.list /etc/apt/sources.list.d/
|
||||
ynh_apt update
|
||||
ynh_package_install -t $codename-backports minidlna
|
||||
else
|
||||
# Install the standard version from debian repository
|
||||
ynh_apt update
|
||||
ynh_package_install minidlna
|
||||
fi
|
||||
ynh_add_app_dependencies --package=minidlna
|
||||
|
||||
#=================================================
|
||||
# INCREASE INOTIFY'S LIMITS
|
||||
|
|
Loading…
Add table
Reference in a new issue