Re: Daemontool-izing MySQL
Rich Derr <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 20, 2003 at 02:04:47AM +0400, Dmitry Volkoff wrote:
> > > envuidgid mysql envdir ./env sh -c '
> > > ...
> > > ' &
> >
> > why do you background the main job in a run script??
>
> Because mysqld cannot be supervised on Linux right way.
> I need to start watchpid after launching mysqld.
Why another program? I don't have any trouble with:
$ cat /service/mysql/run
#!/bin/sh
down() {
HOME=/root /opt/mysql/bin/mysqladmin shutdown
sleep 1
}
trap 'down' TERM
setuidgid mysql /opt/mysql/bin/mysqld --basedir=/opt/mysql --datadir=/opt/mysql/data --pid-file=/opt/mysql/data/mysqld.pid --skip-locking --log=/opt/mysql/data/mysqld.log --flush --safe-show-database --tmpdir=/var/tmp &
wait
(root has a password in .my.cnf.) Am I missing any advantages?
--
Rich Derr, Sr. Network Administrator, Partner
www.ntdcommunications.com