mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
commit
78b5378b87
9 changed files with 16 additions and 12 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
WireGuard® is fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN.
|
||||
|
||||
**Shipped version:** 0.3.6~ynh1
|
||||
**Shipped version:** 0.3.6~ynh2
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
WireGuard® is fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN.
|
||||
|
||||
**Version incluse :** 0.3.6~ynh1
|
||||
**Version incluse :** 0.3.6~ynh2
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,9 +6,7 @@ Wants=network-online.target nss-lookup.target
|
|||
[Service]
|
||||
Type=oneshot
|
||||
User=root
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/bin/systemctl restart wg-quick@%I.service
|
||||
ExecStop=/bin/systemctl stop wg-quick@%I.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Web user interface to manage your WireGuard setup",
|
||||
"fr": "Interface utilisateur Web pour gérer votre configuration WireGuard"
|
||||
},
|
||||
"version": "0.3.6~ynh1",
|
||||
"version": "0.3.6~ynh2",
|
||||
"url": "https://github.com/ngoduykhanh/wireguard-ui",
|
||||
"upstream": {
|
||||
"license": "MIT",
|
||||
|
|
|
@ -15,7 +15,7 @@ fi
|
|||
# dependencies used by the app
|
||||
pkg_dependencies="$pkg_headers wireguard-dkms wireguard"
|
||||
|
||||
interface=$(ip route | awk '/default/ { print $5 }')
|
||||
interface=$(ip route | awk '/default/ { print $5 }' | head -n1)
|
||||
|
||||
main_domain=$(cat /etc/yunohost/current_host)
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ chown -R $app: /etc/wireguard
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add wireguard@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wg-quick@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wireguard_ui --description="WireGuard UI"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -35,10 +35,10 @@ then
|
|||
yunohost service remove wireguard_ui
|
||||
fi
|
||||
|
||||
if ynh_exec_warn_less yunohost service status wireguard@wg0 >/dev/null
|
||||
if ynh_exec_warn_less yunohost service status wg-quick@wg0 >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing WireGuard service integration..." --weight=1
|
||||
yunohost service remove wireguard@wg0
|
||||
yunohost service remove wg-quick@wg0
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -132,7 +132,7 @@ sysctl -p /etc/sysctl.d/$app.conf
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add wireguard@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wg-quick@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wireguard_ui --description="WireGuard UI"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -107,6 +107,12 @@ if systemctl list-units --full -all | grep -Fq "wireguard_ui_conf.service"; then
|
|||
ynh_secure_remove --file="/etc/systemd/system/wireguard_ui_conf.service"
|
||||
fi
|
||||
|
||||
# Remove the service integration from an older version
|
||||
if ynh_exec_warn_less yunohost service status wireguard@wg0 >/dev/null
|
||||
then
|
||||
yunohost service remove wireguard@wg0
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -115,7 +121,7 @@ fi
|
|||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=wireguard_ui --action="stop" --line_match="Stopped WireGuard UI" --log_path="systemd" --timeout=30
|
||||
ynh_systemd_action --service_name=wireguard@wg0 --action="stop"
|
||||
ynh_systemd_action --service_name=wg-quick@wg0 --action="stop"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -220,7 +226,7 @@ chown -R $app: /etc/wireguard
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add wireguard@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wg-quick@wg0 --description="WireGuard VPN" --needs_exposed_ports="$port_wg" --test_status="wg show | grep wg0"
|
||||
yunohost service add wireguard_ui --description="WireGuard UI"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue