You are not logged in.

#1 2007-02-08 13:22:14

rabid_dog
Member
Registered: 2006-06-07
Posts: 23

Problem with greylistd - How to background daemon? [solved]

Recently I tried to install greylistd from Debian project.
http://packages.debian.org/unstable/mail/greylistd
I wrote PKGBUILD and make package.
And, when I start greylistd - it runs into foreground! But I need to run this in background.
Same thing with spfd from package 'perl-mail-spf-query'

In sources of debian greylistd package I found init script, and inside it:

   echo -n "Starting greylisting daemon: "
        start-stop-daemon --start --background \
            --chuid "$user" \
            --pidfile "$pidfile" --make-pidfile \
            --exec "$daemon" &&
            echo "${daemon##*/}."

It seems that I needed this start-stop-daemon or must to find alternate way to start daemon in backgrund.
Anyone have suggestions?

Last edited by rabid_dog (2007-02-09 05:27:53)

Offline

#2 2007-02-08 13:38:17

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Problem with greylistd - How to background daemon? [solved]

This might be a stupid and all too obvious response, but have you tried adding it to rc.conf daemons section with a "@" in front of it? Or do you need it on-the-fly and not at bootup?

Last edited by Misfit138 (2007-02-08 13:39:13)

Offline

#3 2007-02-08 13:54:06

rabid_dog
Member
Registered: 2006-06-07
Posts: 23

Re: Problem with greylistd - How to background daemon? [solved]

Problem already resolved.

Misfit138,
Thanks for response smile
It is not what I want. Greylistd have no initscript (really have, but Debian one), and leaves no pidfile, nothing - just runs in foreground as any usual program. As i understand from wiki - @ before daemon just start its initscript in background, parallel with others.
If greylistd was written on Perl - i could easilly modify it to make it a daemon, but it written on Python.

Anyway, I succesfully manage to extract start-stop-daemon source from dpkg package and compile it separately. (full package does not want to build)

Offline

Board footer

Powered by FluxBB