2021-11-25 17:59:02 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
python_version="3.7"
|
|
|
|
python_major_version=$(echo $python_version | cut -d. -f1)
|
|
|
|
|
2023-10-27 15:10:20 +02:00
|
|
|
#REMOVEME? pkg_dependencies="libxml2-dev libxslt1-dev unrar-free ffmpeg libatlas-base-dev"
|
2022-02-04 18:25:27 +01:00
|
|
|
pkg_dependencies+=" python${python_major_version}-libxml2 python${python_major_version}-lxml"
|
|
|
|
pkg_dependencies+=" python${python_major_version}-dev python${python_major_version}-venv"
|
2021-11-25 17:59:02 +01:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
detect_and_read_radarr_and_sonarr_settings() {
|
|
|
|
|
|
|
|
if ls /etc/yunohost/apps | grep -q "radarr"; then
|
|
|
|
radarr_installed=True
|
2023-10-27 15:10:20 +02:00
|
|
|
#REMOVEME? radarr_port=$(ynh_app_setting_get --app radarr --key port)
|
|
|
|
#REMOVEME? radarr_path=$(ynh_app_setting_get --app radarr --key path)
|
|
|
|
#REMOVEME? radarr_api_key=$(ynh_app_setting_get --app radarr --key api_key)
|
2021-11-25 17:59:02 +01:00
|
|
|
else
|
|
|
|
radarr_installed=False
|
|
|
|
radarr_port=""
|
|
|
|
radarr_path=""
|
|
|
|
radarr_api_key=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ls /etc/yunohost/apps | grep -q "sonarr"; then
|
|
|
|
sonarr_installed=True
|
2023-10-27 15:10:20 +02:00
|
|
|
#REMOVEME? sonarr_port=$(ynh_app_setting_get --app sonarr --key port)
|
|
|
|
#REMOVEME? sonarr_path=$(ynh_app_setting_get --app sonarr --key path)
|
|
|
|
#REMOVEME? sonarr_api_key=$(ynh_app_setting_get --app sonarr --key api_key)
|
2021-11-25 17:59:02 +01:00
|
|
|
else
|
|
|
|
sonarr_installed=False
|
|
|
|
sonarr_port=""
|
|
|
|
sonarr_path=""
|
|
|
|
sonarr_api_key=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|