Skip to content

Commit

Permalink
fix: port forwarder missing short options usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-grande committed Jan 27, 2024
1 parent c6dbccf commit 6bfb375
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions salt/sys-syncthing/files/admin/firewall/qvm-port-forward
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,20 @@ recurse_netvms() {
}

usage() {
echo "Usage: ${0##*/} --action ACTION --qube QUBE --port PORT --proto PROTO --persistent
echo "Usage: ${0##*/} --action ACTION --qube QUBE --port PORT --proto PROTO [--persistent]
Options:
-a, --action ACTION add or delete a rule (add, del)
-q, --qube QUBE qube name which holds the service to be exposed
-p, --port PORT port number to be exposed
-n, --proto PROTO protocol the service uses (tcp, udp)
-s, --persistent persist rules across reboots
Example:
${0##*/} --action add --qube work --port 22 --proto tcp
${0##*/} --action add --qube work --port 444 --proto udp --persistent
${0##*/} --action del --qube work --port 22 --proto tcp
${0##*/} --action del --qube work --port 444 --proto udp
Note: Defaults to temporary rules
Warn: If persistent is and and a netvm is disposable, the rule will be saved in the disposable template" >&2
Warn: Use of '--persistent' with disposable netvm saves the rule in the disposable template" >&2
exit 1
}

Expand Down

0 comments on commit 6bfb375

Please sign in to comment.