1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

build: update restore and upgrade script

This commit is contained in:
tytan652 2020-12-22 22:06:35 +01:00 committed by tituspijean
parent 11e947d4f9
commit 44a050d71c
3 changed files with 30 additions and 4 deletions

View file

@ -75,8 +75,6 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $port_wg
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=7
# ynh_install_extra_app_dependencies --repo="http://deb.debian.org/debian buster-backports main" --package="$pkg_dependencies"
#Add buster-backports repo
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
@ -88,6 +86,7 @@ ynh_package_update
ynh_add_app_dependencies --package="$pkg_dependencies"
#Remove buster-backports repo and pin-priority
ynh_remove_extra_repo --name=$app
#=================================================

View file

@ -85,7 +85,20 @@ chmod -R 750 $final_path/db
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
# Define and install dependencies
ynh_install_extra_app_dependencies --repo="http://http.debian.net/debian buster-backports main" --package=$pkg_dependencies
#Add buster-backports repo
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
#Add pin-priority for wireguard package
ynh_pin_repo --package="wireguard*" --pin="origin deb http://deb.debian.org/debian buster-backports main" 995 --name="$app"
# Update the list of package with the new repo
ynh_package_update
ynh_add_app_dependencies --package="$pkg_dependencies"
#Remove buster-backports repo and pin-priority
ynh_remove_extra_repo --name=$app
#=================================================
# RESTORE SYSTEMD

View file

@ -104,7 +104,21 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=7
ynh_install_extra_app_dependencies --repo="http://deb.debian.org/debian buster-backports main" --package="$pkg_dependencies"
#TODO: remove buster-backports kernel
#Add buster-backports repo
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
#Add pin-priority for wireguard package
ynh_pin_repo --package="wireguard*" --pin="origin deb http://deb.debian.org/debian buster-backports main" 995 --name="$app"
# Update the list of package with the new repo
ynh_package_update
ynh_add_app_dependencies --package="$pkg_dependencies"
#Remove buster-backports repo and pin-priority
ynh_remove_extra_repo --name=$app
#=================================================
# CREATE DEDICATED USER