diff --git a/CHANGELOG b/CHANGELOG index 10b2975..2500a1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp * store and compare state between restart * colorize output if terminal supports colors * simple syslog logging +* "version" action ### Changed diff --git a/minifirewall b/minifirewall index 438c631..d6019d9 100755 --- a/minifirewall +++ b/minifirewall @@ -1033,10 +1033,21 @@ reset() { syslog_info "reset" printf "${GREEN}${BOLD}${NAME} reset${RESET}\n" } +show_version() { + cat <. + +${NAME} comes with ABSOLUTELY NO WARRANTY. +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 3 +of the License. +END +} -echo "${NAME} version ${VERSION}" source_configuration - check_unpersisted_state case "${1:-''}" in @@ -1061,8 +1072,12 @@ case "${1:-''}" in start ;; + version) + show_version + ;; + *) - echo "Usage: $0 {start|stop|restart|status|reset}" + echo "Usage: $0 {start|stop|restart|status|reset|version}" exit 1 ;; esac