[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [bug] Restarting Daemons on package install/upgrade.

>>>>> "John" == John Hasler <john@dhh.gt.org> writes:

    John> Karl M. Hegbloom writes:
    >> I've noticed that when I install or upgrade a daemon, it's
    >> often started up during the postinst regardless of whether I
    >> have that service enabled via /etc/rcN.d for the runlevel I am
    >> currently in.  This is very annoying.

    John> A good point.

    >> Please, if you maintain a daemon package, fix it, for potato,
    >> so that it only restarts if there's a link to the init.d script
    >> from the runlevel directory of the current runlevel.

    John> How do you suggest that this be done? 

 How about a simple:

 if ps ax | grep $DAEMON | grep -qv grep;
        # go ahead and restart the daemon.
        # the daemon isn't running right now.

Reply to: