X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=nagios%2Fmonitor-nagios.init;fp=nagios%2Fmonitor-nagios.init;h=ebab5b85b74688ddce66c95e912141639c3f5542;hb=e01c2cd8fc39ce756ff04dcae3791e8af28013f7;hp=1b390fdf9b83417ffa1cffc543c57f4f0a307fa8;hpb=47471d23830c6020a87513dd89cda6572b7b26bf;p=monitor.git diff --git a/nagios/monitor-nagios.init b/nagios/monitor-nagios.init index 1b390fd..ebab5b8 100644 --- a/nagios/monitor-nagios.init +++ b/nagios/monitor-nagios.init @@ -21,6 +21,11 @@ # NOTE: expect that mysqld is already started. start () { + + if ! $( mysqladmin ping 2> /dev/null ) ; then + echo "mysqld is not running; cannot continue; exit..." + exit + fi # if it's a fresh install, there is no root passwd. if $( mysqladmin -u root create nagios ) ; then