git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add check to see if mysqld is running in init script
[monitor.git]
/
nagios
/
monitor-nagios.init
diff --git
a/nagios/monitor-nagios.init
b/nagios/monitor-nagios.init
index
1b390fd
..
ebab5b8
100644
(file)
--- a/
nagios/monitor-nagios.init
+++ b/
nagios/monitor-nagios.init
@@
-21,6
+21,11
@@
# NOTE: expect that mysqld is already started.
start () {
# 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
# if it's a fresh install, there is no root passwd.
if $( mysqladmin -u root create nagios ) ; then