Skip to content
Snippets Groups Projects

Add systemdunit

Merged Hahn Axel (hahn) requested to merge add-systemdunit into master
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -39,6 +39,7 @@
# 2023-06-22 v1.11 <axel.hahn@unibe.ch> fix ph.toUnit with float values; shell fixes
# 2023-08-24 v1.12 <axel.hahn@unibe.ch> toUnit got 3rd param for count of digits after "."
# 2023-08-30 v1.13 <axel.hahn@unibe.ch> reverse return code in ph.hasParamoption to unix like return codes: 0=true; <>0 = false
# 2023-09-05 v1.14 <axel.hahn@unibe.ch> ph.require - show error below status line
# ======================================================================
@@ -62,10 +63,11 @@ function ph.abort(){
# check required binaries in the path
# param(s) string name of binary to check with "which" command
function ph.require(){
which $* >/dev/null
if [ $? -ne 0 ]; then
local _out;
if ! _out=$( which $* 2>&1 ); then
ph.setStatus "unknown"
ph.status "$0 requires the following tools to run: $*"
echo "$_out"
ph.exit
fi
}
Loading