From cae6338c4f3c0045f17e9f15dd38786d97ab496d Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 14 Feb 2020 14:13:37 +0100 Subject: #957: New function to show the script version. --- server/lib/ogfunctions.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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" -- cgit v1.2.3-18-g5258