From 3a055f4d2f7cc0b07359aae8d8e2f87cb28fea3a Mon Sep 17 00:00:00 2001 From: Alexandre CHAZAL Date: Wed, 13 Oct 2021 15:10:08 +0000 Subject: [PATCH] feat(del-wg): now checking if run as root --- del-wg.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/del-wg.sh b/del-wg.sh index 6ab5a30..77c3a56 100644 --- a/del-wg.sh +++ b/del-wg.sh @@ -1,5 +1,10 @@ #! /usr/bin/env bash +if [ $(id -u) -ne 0 ]; then + echo "[!!] This program must be run as root" + exit -1 +fi + if [ $# -ne 1 ]; then echo "[!!] I (just) need the base64 pubkey of the target client" exit 1