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
48372a56
Commit
48372a56
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
add params for help and cutom install directory
parent
15fd0f1e
No related branches found
No related tags found
1 merge request
!124
Update docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_clientbackup
+46
-2
46 additions, 2 deletions
check_clientbackup
with
46 additions
and
2 deletions
check_clientbackup
+
46
−
2
View file @
48372a56
...
...
@@ -16,16 +16,60 @@
# 2022-08-10 v1.9 <axel.hahn@iml.unibe.ch> FIX: mask the dot in .log
# 2022-10-21 v1.10 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# show last backup, prune, verify
# 2023-06-22 v1.11 <axel.hahn@unibe.ch> add help and param support; add parameter for install directory
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPVERSION
=
1.11
sInstalldir
=
/opt/imlbackup/client/
sChecker
=
$sInstalldir
/check_clientbackup.sh
# ----------------------------------------------------------------------
# FUNCTIONS
# ----------------------------------------------------------------------
function
showHelp
(){
_self
=
$(
basename
$0
)
cat
<<
EOF
______________________________________________________________________
$self_APPNAME
v
$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Show status of IML backup.
SYNTAX:
$_self
[-d DIRECTORY]
OPTIONS:
-h or --help show this help.
-d or --dir set installation dir of iml backup to find its check skript
default: /opt/imlbackup/client/
EXAMPLE:
$_self
-d /home/backup/imlbackup
set a custom directory und run the backup check
EOF
}
# --- check param -h
while
[[
"$#"
-gt
0
]]
;
do case
$1
in
-h
|
--help
)
showHelp
;
exit
0
;;
-d
|
--dir
)
sInstalldir
=
$2
;
shift
;
shift
;;
*
)
echo
"ERROR: Unknown parameter:
$1
"
;
showHelp
;
exit
1
;
esac
;
done
sChecker
=
$sInstalldir
/check_clientbackup.sh
if
[
!
-x
$sChecker
]
;
then
ph.abort
"
$sChecker
not found - maybe clientbackup is not installed."
ph.abort
"
$sChecker
not found - maybe clientbackup is not installed
here. Use param -d to set the install directory
."
fi
result
=
$(
$sChecker
)
...
...
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