Created
November 7, 2017 15:04
-
-
Save pvdb458/8f245d0e829e10061d0f28f4098b057f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################# | |
| # Ifdown script for WireGuard | |
| ############################# | |
| . /etc/init.d/functions | |
| cd /etc/sysconfig/network-scripts | |
| . ./network-functions | |
| [ -f ../network ] && . ../network | |
| CONFIG=${1} | |
| need_config "${CONFIG}" | |
| source_config | |
| ip link del dev ${DEVICE} 2>/dev/null || { | |
| net_log $"WARNING: Device not found. Aborting script" | |
| exit 1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment