install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py
# TODO:
-echo " * TODO: Setting up Monitor account in local MyPLC"
-
#touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
#chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
%post nagios
# TODO: do as much as possible to get the host setup and running.
-chkconfig --add monitor-nagios
-chkconfig monitor-nagios on
+#chkconfig --add monitor-nagios
+#chkconfig monitor-nagios on
chkconfig mysqld on
%post server
# 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