From: Jules Colding <colding@omesc.com>
To: Gentoo Users <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] How should I kill a daemon from an ebuild file?
Date: Fri, 27 Jul 2007 14:54:56 +0200 [thread overview]
Message-ID: <1185540896.16094.5.camel@omc-2.omesc.com> (raw)
Hi,
I have an ebuild (see below) for a small keyring daemon. I would like to
kill the daemon process, if it is running, whenever it is emerged again
to ensure that no running daemon process refers to an old install.
Is there a clean and recommended way of doing this in an ebuild or
should I just use killall in pkg_postinst()?
Thanks,
jules
#
# Ebuild file for the Brutus Keyring.
# Copyright (C) 2007 OMC Denmark ApS
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
# Please see http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds
# on how to use this ebuild file.
#
# $Header: $
inherit eutils
DESCRIPTION="Brutus Keyring daemon"
HOMEPAGE="http://www.omesc.com/"
SRC_URI="http://www.omesc.com/sites/default/files/downloads/dist/brutus-keyring/Gentoo/brutus-keyring-0.9.3.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="debug"
RESTRICT="nomirror"
DEPEND=">=gnome-base/orbit-2.14.1
>=dev-libs/libIDL-0.8.5
>=dev-util/pkgconfig-0.20
>=dev-libs/libgcrypt-1.2.2
gnome-base/gnome-common"
DOCS="COPYING README INSTALL docs/brutus-keyring-guide docs/brutus-keyring-devel-guide"
src_compile() {
BRUTUS_ECONF="--enable-brutus-dist=yes \
--enable-brutus-devel=yes \
--enable-brutus-target=gentoo \
$(use_enable debug brutus-debug yes)"
econf ${BRUTUS_ECONF} || die "econf failed"
emake || die "emake failed"
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc ${DOCS}
}
pkg_postinst() {
elog "brutus-keyring has been installed"
}
--
gentoo-user@gentoo.org mailing list
next reply other threads:[~2007-07-27 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 12:54 Jules Colding [this message]
2007-07-27 13:45 ` [gentoo-user] How should I kill a daemon from an ebuild file? Albert Hopkins
2007-07-27 13:47 ` Jules Colding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1185540896.16094.5.camel@omc-2.omesc.com \
--to=colding@omesc.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox