Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-passive-client
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source
icinga-passive-client
Merge requests
!2
Add param for cfgfile
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Add param for cfgfile
add-param-for-cfgfile
into
master
Overview
0
Commits
2
Pipelines
0
Changes
2
Merged
Hahn Axel (hahn)
requested to merge
add-param-for-cfgfile
into
master
3 years ago
Overview
0
Commits
2
Pipelines
0
Changes
2
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
a7c8b284
2 commits,
3 years ago
2 files
+
102
−
58
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
director-cli.sh
+
23
−
11
View file @ a7c8b284
Edit in single-file editor
Open in Web IDE
Show full file
@@ -13,12 +13,11 @@
# - use puppet facts
# - UniBe network and group names - see hostCreate()
#
# ----------------------------------------------------------------------
# ah = axel.hahn@iml.unibe.ch
# 2022-02-16 v0.2 ah add --cfg param
# ======================================================================
.
`
dirname
$0
`
/inc_getconfig.sh
.
`
dirname
$0
`
/inc_functions.sh
.
`
dirname
$0
`
/inc/rest-api-client.sh
tmpfile
=
/tmp/outcurl.tmp
tmpfile2
=
/tmp/outcurl2.tmp
@@ -733,6 +732,10 @@ Director actions
Other parameters
--cfg CONFIGFILE
load a costom config file; default: ./inc_getconfig.sh
This must be the 1st parameter to be processed.
--debug
enable debug output.
@@ -761,24 +764,33 @@ echo
echo
"##### DIRECTOR HELPER
$MY_NAME
-
$MY_IP
"
echo
if
[
"
$1
"
=
"--cfg"
]
&&
[
-n
"
$2
"
]
;
then
echo
"INFO: loading custom config [
$2
]..."
.
"
${
2
}
"
shift
2
else
.
"
$(
dirname
$0
)
/inc_getconfig.sh"
fi
.
`
dirname
$0
`
/inc_functions.sh
.
`
dirname
$0
`
/inc/rest-api-client.sh
if
[
$#
-eq
0
]
;
then
showHelp
exit
0
fi
cd
`
dirname
$0
`
ls
./
`
basename
$0
`
>
/dev/null
||
exit
1
_initVars
# ensure that ./inc_getconfig.sh was loaded
if
[
-z
"
${
dir_cfg
}
"
]
;
then
echo
ERROR: Client is not installed/ configured yet on this machine.
exit
1
fi
if
[
$#
-eq
0
]
;
then
showHelp
exit
0
fi
while
[
$#
-gt
0
]
;
do
case
"
$1
"
in
Loading