This commit is contained in:
TheK4n 2023-11-24 09:51:19 +03:00
parent 2b4f1559ff
commit 5780ddac2f
2 changed files with 2 additions and 4 deletions

View File

@ -116,9 +116,7 @@ mcd() {
## sudo usermod -aG wireguard $USER
vpn() {
local STATUS SERVICE CONFIG CONFIGFILE
CONFIG="$1"
test -z "$CONFIG" && CONFIG="wg0"
CONFIG="${1:-wg0}"
CONFIGFILE="/etc/wireguard/$CONFIG.conf"

View File

@ -32,7 +32,7 @@ declare -A TARGETS=(
_die() {
echo "$0: $1" >&2
exit "$2"
exit $2
}
test "$0" = "./install" || _die "Error: Please, run this file from root of dotfiles, like this './install.sh TARGET" 1