I've got MySQL working now for Fremantle, but I'm struggling with the upstart 
script for it. Probably due to my lack of understanding about upstart.

The script I'm working with (dummy start/stop events for testing):

-----------------------------------------------------------------------------------
description     "MySQL server"
author          "Tony Green"
start on xxx
stop on yyy
script
        /usr/bin/mysqld_safe --user=mysql --skip-innodb 
--pid-file=/var/lib/mysql/mysql.pid --log-error=/var/lib/mysql/error.log &
end script
post-stop script
        if [ -f /var/lib/mysql/mysql.pid ]
        then
                kill `cat /var/lib/mysql/mysql.pid`
        fi
end script
----------------------------------------------------------------------------------------

As it stands, "initctl emit xxx" or "/sbin/start mysqld" starts it, but because 
the mysqld command is backgrounded, it runs through the post-stop script and 
shuts the daemon down.

If I take out the backgrounding, it works as expected, BUT it blocks the 
initctl command until I do "initctl emit yyy" from another console. 

My worry is that if starting MySQL blocks whatever sends the signals during 
startup, then anything else dependent on that signal won't be started until 
MySQL stops.

Am I worrying unnecessarily? Or is there something glaringly obvious that I'm 
doing wrong?

Thanks


-- 
Tony Green
Ipswich, Suffolk, England
www.beermad.org.uk/
www.suffolkcamra.co.uk/pubs/
My PGP public key: www.beermad.org.uk/cgi-bin/pgp.cgi

* No Micro$oft products were used in the generation of this communication
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to