From 5780ddac2f3c7a47dc6fa33580f4ae97cca49b09 Mon Sep 17 00:00:00 2001 From: Thek4n Date: Fri, 24 Nov 2023 09:51:19 +0300 Subject: [PATCH] refs --- home/user/.config/bash/functions | 4 +--- install | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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