#! /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 fi # Suppression du pair wg set wg0 peer $1 remove # Enregistrement de la modification wg-quick save wg0 # Suppression de sa config echo "[++] Peer has been removed (if it really existed)" echo "[++] Key was : $1"