Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
perun-proxy-utils
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
Perun
Perun ProxyIdP
perun-proxy-utils
Commits
3ce1bbc3
Unverified
Commit
3ce1bbc3
authored
6 years ago
by
Pavel Vyskočil
Browse files
Options
Downloads
Patches
Plain Diff
Added git_pull_check.sh
parent
f6363ace
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+7
-0
7 additions, 0 deletions
README.md
git_pull_check.sh
+23
-0
23 additions, 0 deletions
git_pull_check.sh
with
30 additions
and
0 deletions
README.md
+
7
−
0
View file @
3ce1bbc3
...
@@ -3,6 +3,13 @@
...
@@ -3,6 +3,13 @@
## List of Local scripts
## List of Local scripts
Local scripts are located in /usr/lib/check_mk/local/
Local scripts are located in /usr/lib/check_mk/local/
### git_pull_check.sh
*
Attributes to be filled:
<pre>
# List of paths to check separated by space
paths=""
</pre>
## List of plugins
## List of plugins
Local scripts are located in /usr/lib/check_mk/plugins/
Local scripts are located in /usr/lib/check_mk/plugins/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
git_pull_check.sh
0 → 100755
+
23
−
0
View file @
3ce1bbc3
#!/bin/bash
# List of paths to check separated by space
paths
=
""
for
path
in
$paths
do
if
[[
-d
$path
]]
;
then
cd
$path
result
=
$(
git fetch
--dry-run
2>&1
)
if
[[
-n
$result
]]
;
then
status
=
1
statustxt
=
"WARNING - There are available new commits"
else
status
=
0
statustxt
=
"OK"
fi
else
status
=
2
statustxt
=
"CRITICAL - Directory does not exist"
fi
echo
"
$status
git_pull_check_dir=
$path
-
$statustxt
"
done
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