mirror of
https://github.com/YunoHost-Apps/tvheadend_ynh.git
synced 2024-10-01 13:34:50 +02:00
Fix confusing related to multiple calls to apt install
This commit is contained in:
parent
6dbf7bbd64
commit
4cb7b0435d
1 changed files with 1 additions and 30 deletions
|
@ -1,24 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# COMMON VARIABLES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
debian=$(lsb_release --codename --short)
|
|
||||||
pkg_version_bullseye="4.3-2192~gc9b38a81a~bullseye"
|
|
||||||
pkg_version_bookworm="4.3-2098~g44bf691ac~bookworm"
|
|
||||||
|
|
||||||
pkg_version_name=pkg_version_$debian
|
|
||||||
pkg_version="${!pkg_version_name}"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# PERSONAL HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
_install_tvheadend_package() {
|
_install_tvheadend_package() {
|
||||||
# Download the package
|
# Download the package
|
||||||
if [ ! -f "$install_dir/tvheadend.deb" ]; then
|
if [ ! -f "$install_dir/tvheadend.deb" ]; then
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id="main_$debian"
|
ynh_setup_source --dest_dir="$install_dir" --source_id="main_$YNH_DEBIAN"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pre-seed debconf database with answers of the interactive dpkg
|
# Pre-seed debconf database with answers of the interactive dpkg
|
||||||
|
@ -32,12 +17,6 @@ _install_tvheadend_package() {
|
||||||
|
|
||||||
chown -R "hts:video" "$data_dir"
|
chown -R "hts:video" "$data_dir"
|
||||||
|
|
||||||
# The doc says it should be called only once,
|
|
||||||
# but the code says multiple calls are supported.
|
|
||||||
# Also, they're already installed so that should be quasi instantaneous.
|
|
||||||
ynh_install_app_dependencies \
|
|
||||||
tvheadend="$pkg_version"
|
|
||||||
|
|
||||||
# Mark packages as dependencies, to allow automatic removal
|
# Mark packages as dependencies, to allow automatic removal
|
||||||
apt-mark auto tvheadend
|
apt-mark auto tvheadend
|
||||||
|
|
||||||
|
@ -53,11 +32,3 @@ _uninstall_tvheadend_package() {
|
||||||
# Delete the system user created by the package
|
# Delete the system user created by the package
|
||||||
deluser hts --remove-home
|
deluser hts --remove-home
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# EXPERIMENTAL HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# FUTURE OFFICIAL HELPERS
|
|
||||||
#=================================================
|
|
||||||
|
|
Loading…
Reference in a new issue