1
ewconfig/scripts/wg-restart

13 lines
218 B
Bash
Executable File

#! /usr/bin/env bash
# Fully restarts a wireguard link
set -e
# Check args
if [ $# != 1 ]; then
echo "Usage: wg-restart <interface>"
fi
# Its ok if the down command fails
wg-quick down $1 || true;
wg-quick up $1