mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
use ynh_install_extra_app_dependencies for non-free
This commit is contained in:
parent
bf890a9e27
commit
333a3981e5
3 changed files with 9 additions and 17 deletions
|
@ -113,14 +113,10 @@ export DEBIAN_FRONTEND=noninteractive
|
||||||
# Packaged USB Wireless Device firmwares
|
# Packaged USB Wireless Device firmwares
|
||||||
# Based on https://wiki.debian.org/WiFi#USB_Devices
|
# Based on https://wiki.debian.org/WiFi#USB_Devices
|
||||||
if [[ $firmware_nonfree -eq 1 ]]; then
|
if [[ $firmware_nonfree -eq 1 ]]; then
|
||||||
# check if non-free is set on sources.list
|
|
||||||
if ! grep -q non-free /etc/apt/sources.list ; then
|
|
||||||
sed '/debian/{s/main/& non-free/}' -i /etc/apt/sources.list
|
|
||||||
fi
|
|
||||||
check_armbian_nonfree_conflict
|
check_armbian_nonfree_conflict
|
||||||
packages=$nonfree_firmware_packages
|
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian $(ynh_get_debian_release) non-free" --package="$nonfree_firmware_packages"
|
||||||
else
|
else
|
||||||
packages=$free_firmware_packages
|
pkg_dependencies="$pkg_dependencies $free_firmware_packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -128,7 +124,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies"
|
ynh_script_progression --message="Installing dependencies"
|
||||||
|
|
||||||
ynh_install_app_dependencies "$pkg_dependencies" "$packages"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
|
@ -58,14 +58,10 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
if [[ $firmware_nonfree -eq 1 ]]; then
|
if [[ $firmware_nonfree -eq 1 ]]; then
|
||||||
# check if non-free is set on sources.list
|
|
||||||
if ! grep -q non-free /etc/apt/sources.list ; then
|
|
||||||
sed '/debian/{s/main/& non-free/}' -i /etc/apt/sources.list
|
|
||||||
fi
|
|
||||||
check_armbian_nonfree_conflict
|
check_armbian_nonfree_conflict
|
||||||
packages=$nonfree_firmware_packages
|
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian $(ynh_get_debian_release) non-free" --package="$nonfree_firmware_packages"
|
||||||
else
|
else
|
||||||
packages=$free_firmware_packages
|
pkg_dependencies="$pkg_dependencies $free_firmware_packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/sudoers.d/${app}_ynh"
|
ynh_restore_file --origin_path="/etc/sudoers.d/${app}_ynh"
|
||||||
|
@ -118,7 +114,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
ynh_script_progression --message="Reinstalling dependencies..."
|
ynh_script_progression --message="Reinstalling dependencies..."
|
||||||
|
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies "$pkg_dependencies" "$packages"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -116,12 +116,12 @@ ynh_script_progression --message="Upgrading dependencies..."
|
||||||
|
|
||||||
if [[ $firmware_nonfree -eq 1 ]]; then
|
if [[ $firmware_nonfree -eq 1 ]]; then
|
||||||
check_armbian_nonfree_conflict
|
check_armbian_nonfree_conflict
|
||||||
packages=$nonfree_firmware_packages
|
ynh_install_extra_app_dependencies --repo="deb http://deb.debian.org/debian $(ynh_get_debian_release) non-free" --package="$nonfree_firmware_packages"
|
||||||
else
|
else
|
||||||
packages=$free_firmware_packages
|
pkg_dependencies="$pkg_dependencies $free_firmware_packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_install_app_dependencies "$pkg_dependencies" "$packages"
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
Loading…
Add table
Reference in a new issue