summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-03-09 22:35:52 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-09 22:35:52 +0000
commit22b57c129762159e0a6dede9971c9c9d7088fad1 (patch)
treeff47c8f262c209bf796cf89964fc50e79aad8df9
parent09647d0fde0467343e0740a01d77cc20e7a39837 (diff)
parentcf4545d8d0709bcd7cb32cbfc9d7988d558d8065 (diff)
Merge "Change the way to detect monit configuration dir"
-rwxr-xr-xutils/jenkins-jnlp-connect.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh
index 6fb6827fd..e0c6ff2e0 100755
--- a/utils/jenkins-jnlp-connect.sh
+++ b/utils/jenkins-jnlp-connect.sh
@@ -48,10 +48,14 @@ if [[ $(whoami) != "root" && $(whoami) != "$jenkinsuser" ]]; then
exit 1
fi
-if [[ $distro == Debian || $distro == Ubuntu ]]; then
+if [ -d /etc/monit/conf.d ]; then
monitconfdir="/etc/monit/conf.d/"
-elif [[ $distro == Fedora || $distro == CentOS || $distro == Redhat ]]; then
+elif [ -d /etc/monit.d ]; then
monitconfdir="/etc/monit.d"
+else
+ echo "Could not determine the location of the monit configuration file."
+ echo "Make sure monit is installed."
+ exit 1
fi
#make pid dir
@@ -186,6 +190,5 @@ do
done
connectionstring="java -jar slave.jar -jnlpUrl https://build.opnfv.org/ci/computer/"$slave_name"/slave-agent.jnlp -secret "$slave_secret" -noCertificateCheck "
-distro="$(tr -s ' \011' '\012' < /etc/issue | head -n 1)"
main "$@"