Skip to content
Snippets Groups Projects
Commit 5a7f1e1d authored by Michal Heppler's avatar Michal Heppler
Browse files

Přidání testovacího skriptu pro Nagios

parent 8b355174
Branches master
No related tags found
No related merge requests found
#!/bin/bash
GITLAB_REPO='git@gitlab.ics.muni.cz:72906/gitlab_zije.git'
FILE_IN_REPO='gitlab_zije/gitlab_zije'
HTTP_REPO='https://gitlab.ics.muni.cz/72906/gitlab_zije/raw/master/gitlab_zije'
TMPREPO=`mktemp -d /tmp/check_gitlab.XXXX`
$( cd "${TMPREPO}"; git clone "${GITLAB_REPO}" &>/dev/null; )
if [ -e "${TMPREPO}/${FILE_IN_REPO}" ]; then
rm -rf "${TMPREPO}"
if wget -q --no-check-certificate -O /dev/null "${HTTP_REPO}"; then
echo -n "OK: git se zda plne funkcni|"
exit 0
else
echo -n "FAIL: Nepovedlo se stahnout soubor pres HTTP!|"
exit 1
fi
else
rm -rf "${TMPREPO}"
echo -n "FAIL: git clone neni funkcni!|"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment