Skip to content

Commit

Permalink
Update wg_install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dazller4554328 authored Jun 1, 2023
1 parent a593400 commit ff68e73
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions wg_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ fi

# Install WireGuard
write_log "Starting WireGuard installation..."
# Remove any existing wg0 interface
if ip link show wg0 > /dev/null 2>&1; then
write_log "Removing existing wg0 interface..."
wg-quick down wg0 >> "$LOGFILE" 2>&1 || write_log "ERROR: Failed to bring down wg0 interface."
ip link del dev wg0 >> "$LOGFILE" 2>&1 || write_log "ERROR: Failed to delete wg0 interface."
fi

apt-get update -y >> "$LOGFILE" 2>&1 || write_log "ERROR: Failed to update package list."
apt-get install -y wireguard >> "$LOGFILE" 2>&1 || write_log "ERROR: WireGuard installation failed."

Expand Down

0 comments on commit ff68e73

Please sign in to comment.