aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/wg-quick/freebsd.bash
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wg-quick/freebsd.bash')
-rwxr-xr-xsrc/tools/wg-quick/freebsd.bash10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/wg-quick/freebsd.bash b/src/tools/wg-quick/freebsd.bash
index c3fa47a..9d3a402 100755
--- a/src/tools/wg-quick/freebsd.bash
+++ b/src/tools/wg-quick/freebsd.bash
@@ -368,7 +368,7 @@ execute_hooks() {
cmd_usage() {
cat >&2 <<-_EOF
- Usage: $PROGRAM [ up | down | save ] [ CONFIG_FILE | INTERFACE ]
+ Usage: $PROGRAM [ up | down | save | strip ] [ CONFIG_FILE | INTERFACE ]
CONFIG_FILE is a configuration file, whose filename is the interface name
followed by \`.conf'. Otherwise, INTERFACE is an interface name, with
@@ -431,6 +431,10 @@ cmd_save() {
save_config
}
+cmd_strip() {
+ echo "$WG_CONFIG"
+}
+
# ~~ function override insertion point ~~
make_temp
@@ -450,6 +454,10 @@ elif [[ $# -eq 2 && $1 == save ]]; then
auto_su
parse_options "$2"
cmd_save
+elif [[ $# -eq 2 && $1 == strip ]]; then
+ auto_su
+ parse_options "$2"
+ cmd_strip
else
cmd_usage
exit 1