diff --git a/scripts/rm-client.sh b/scripts/rm-client.sh index 6232ddb..5ae8c92 100755 --- a/scripts/rm-client.sh +++ b/scripts/rm-client.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ ! -f "$DEVICE-client_$1.conf" ]; then + echo "No client $1" + exit 1 +fi + CONFIG=$(cat "$DEVICE.conf" | sed "/^\# Client $1/{N;N;N;N;d}") echo "$CONFIG" > "$DEVICE.conf" diff --git a/scripts/show-client.sh b/scripts/show-client.sh index 27292f7..94914ff 100755 --- a/scripts/show-client.sh +++ b/scripts/show-client.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ ! -f "$DEVICE-client_$1.conf" ]; then + echo "No client $1" + exit 1 +fi + cat "$DEVICE-client_$1.conf" echo