mirror of
https://github.com/YunoHost-Apps/fider_ynh.git
synced 2024-09-03 18:36:11 +02:00
Remove backports repository
This commit is contained in:
parent
aae5bc4571
commit
040d0b15a9
4 changed files with 9 additions and 14 deletions
|
@ -7,7 +7,8 @@
|
|||
nodejs_version=16
|
||||
|
||||
# dependencies used by the app (must be on a single line)
|
||||
pkg_dependencies="golang-1.18-go postgresql"
|
||||
pkg_dependencies="postgresql"
|
||||
pkg_dependency_golang="golang-1.18-go"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
@ -42,17 +43,10 @@ build_fider() {
|
|||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
||||
_ynh_enable_backports() {
|
||||
version=$(ynh_get_debian_release)
|
||||
backports_file="/etc/apt/sources.list.d/backports_$version.list"
|
||||
if [[ -f "$backports_file" ]]; then
|
||||
return 0
|
||||
fi
|
||||
{
|
||||
echo "deb http://deb.debian.org/debian $version-backports main contrib non-free"
|
||||
echo "deb-src http://deb.debian.org/debian $version-backports main contrib non-free"
|
||||
} > "$backports_file"
|
||||
apt update
|
||||
install_golang_from_backports() {
|
||||
ynh_exec_warn_less ynh_install_extra_app_dependencies \
|
||||
--repo="deb http://deb.debian.org/debian $version-backports main contrib non-free" \
|
||||
--package="$pkg_dependency_golang"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -69,8 +69,8 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
_ynh_enable_backports
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
install_golang_from_backports
|
||||
ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -82,8 +82,8 @@ chmod +x "$final_path/run_fider"
|
|||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
_ynh_enable_backports
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
install_golang_from_backports
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
|
|
|
@ -102,6 +102,7 @@ chown -R $app:www-data "$final_path"
|
|||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
install_golang_from_backports
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
|
Loading…
Add table
Reference in a new issue