diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-02-14 14:13:37 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-02-14 14:13:37 +0100 |
commit | cae6338c4f3c0045f17e9f15dd38786d97ab496d (patch) | |
tree | 8ca3a81543225e040754558a554fa6f9c24a48fb /server | |
parent | 5133823037e040e8e4694bbce66d9d990e8519e5 (diff) |
#957: New function to show the script version.
Diffstat (limited to 'server')
-rwxr-xr-x | server/lib/ogfunctions.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/lib/ogfunctions.sh b/server/lib/ogfunctions.sh index c630e41f..413a700c 100755 --- a/server/lib/ogfunctions.sh +++ b/server/lib/ogfunctions.sh @@ -57,6 +57,12 @@ function help() { exit 0 } +# Showing script version number. +function version() { + awk '/^#@version/ {v=$2} END {if (v) print v}' "$0" + exit 0 +} + # Functions to manage a service. function restart() { _service restart "$1" |