Add usage/help message to so-monitor-add

This commit is contained in:
William Wernert
2021-02-23 13:48:54 -05:00
parent 5a2fa26d72
commit d5477b4721

View File

@@ -2,4 +2,22 @@
. /usr/sbin/so-common
usage() {
read -r -d '' message <<- EOM
usage: so-monitor-add [-h] NIC
positional arguments:
NIC The interface you want to add to the monitor bond
optional arguments:
-h, --help Show this help message and exit
EOM
echo "$message"
exit 1
}
if [[ $# -eq 0 || $# -gt 1 ]] || [[ $1 == '-h' || $1 == '--help' ]]; then
usage
fi
add_interface_bond0 "$1"