Yes! Thanks for bring this up. I wrote my own init scripts for Mandrake and
Gentoo and the shutdown procedure is basically 'killall dbmail-blah'.
Aaron
Dan Weber <[EMAIL PROTECTED]> said:
> If its a daemon it needs '-p' for pidfiles. These debian init scripts
> are atrocious and need to get updated with pidfiles ;)
> Below is a somewhat modified version of what I used in siproxd. Its not
> very complex, just make 'pidfile = optarg' at the 'p' option and put it
> in some header.
>
>
> char *pidfile;
> int createpidfile(char* pidfile)
> {
> FILE *f = NULL;
> TRACE(TRACE_INFO,"creating PID file [%s]", pidfile);
> if ((f=fopen(pidfile, "w")))
> {
> fprintf(f,"%i\n",(int)getpid());
> fclose(f);
> }
> else
> {
> TRACE(TRACE_ERROR,"couldn't create new PID file: %s",
> strerror(errno));
> return(1);
> }
> return(0);
> }
>
> Dan
>
>
> Aaron Stone wrote:
> > How about this set of command line options across the board...
> >
> > Common options for all DBMail utilities:
> > -f file specify an alternative config file
> > -q quietly skip interactive prompts
> > -n show the intended action but do not perform it, no to all
> > -y perform all proposed actions, as though yes to all
> > -v verbose details
> > -V show the version
> > -h show this help message
> >
> > One option that I'd like to have on the command line for the daemons is a
> > no-daemonize / no-fork option. This would be a great benefit for lots of
> > debugging and testing situations. Would overloading the meaning of '-n'
> > work?
> >
> > Thoughts, questions, comments?
> >
> > Aaron
> > _______________________________________________
> > Dbmail-dev mailing list
> > [email protected]
> > http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> >
>
>
> --------------enigA76E70A2620D0BAB39B88C67
> Content-Type: application/pgp-signature; name="signature.asc"
> Content-Description: OpenPGP digital signature
> Content-Disposition: attachment; filename="signature.asc"
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFA7EZZF6i3K/AxoQERAp8hAKCvAo1x5Ka/FG5HIGHJYUdZHDuLIgCgokVZ
> XjwSALw8bUZECJPFrQaD6us=
> =Y1pt
> -----END PGP SIGNATURE-----
>
> --------------enigA76E70A2620D0BAB39B88C67--
>
> --===============0984879432==
--