Update wireguard.sh

Check installed or not when install wireguard from repository or source

Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
Teddysun 2019-09-25 22:30:37 +09:00
parent c09c313278
commit 71414f3e0b
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D

View File

@ -613,6 +613,7 @@ Options:
}
install_from_repo() {
_is_installed && check_version && _red "WireGuard was already installed\n" && exit 0
check_os
install_wg_1
create_server_if
@ -624,6 +625,7 @@ install_from_repo() {
}
install_from_source() {
_is_installed && check_version && _red "WireGuard was already installed\n" && exit 0
check_os
install_wg_2
create_server_if