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)
|
|
|
|
|
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:18:33 +02:00
|
|
|
radarr_port=$(ynh_app_setting_get --app radarr --key port)
|
|
|
|
radarr_path=$(ynh_app_setting_get --app radarr --key path)
|
|
|
|
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:18:33 +02:00
|
|
|
sonarr_port=$(ynh_app_setting_get --app sonarr --key port)
|
|
|
|
sonarr_path=$(ynh_app_setting_get --app sonarr --key path)
|
|
|
|
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
|
|
|
|
#=================================================
|