diff --git a/home/user/.config/bash/functions b/home/user/.config/bash/functions index b07302e..e087558 100644 --- a/home/user/.config/bash/functions +++ b/home/user/.config/bash/functions @@ -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" diff --git a/install b/install index 6c230ed..5486ebf 100755 --- a/install +++ b/install @@ -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