Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
ca9cc579
Commit
ca9cc579
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
update ph.require
parent
805463ca
Branches
Branches containing commit
No related tags found
1 merge request
!161
Add systemdunit
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc_pluginfunctions
+4
-2
4 additions, 2 deletions
inc_pluginfunctions
with
4 additions
and
2 deletions
inc_pluginfunctions
+
4
−
2
View file @
ca9cc579
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment