summaryrefslogtreecommitdiffstats
path: root/server/lib
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-02-14 14:13:37 +0100
committerRamón M. Gómez <ramongomez@us.es>2020-02-14 14:13:37 +0100
commitcae6338c4f3c0045f17e9f15dd38786d97ab496d (patch)
tree8ca3a81543225e040754558a554fa6f9c24a48fb /server/lib
parent5133823037e040e8e4694bbce66d9d990e8519e5 (diff)
#957: New function to show the script version.
Diffstat (limited to 'server/lib')
-rwxr-xr-xserver/lib/ogfunctions.sh6
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"