icinga2/test/jenkins/livestatus_socket.test

20 lines
428 B
Plaintext
Raw Normal View History

2013-12-05 09:46:51 +01:00
#!/bin/sh
livestatus_path="/var/run/icinga2/cmd/livestatus"
if [ ! -e $livestatus_path ];
2013-12-05 09:46:51 +01:00
then
sudo icinga2-enable-feature livestatus 1> /dev/null
sudo service icinga2 restart 1> /dev/null
sleep 1
if [ ! -e $livestatus_path ];
2013-12-05 09:46:51 +01:00
then
echo "[FAIL] Icinga2 Livestatus socket not found ($livestatus_path)"
2013-12-05 09:46:51 +01:00
exit 1
fi
fi
echo "[OK] Icinga2 Livestatus socket found ($livestatus_path)"
2013-12-05 09:46:51 +01:00
exit 0