From patchwork Mon Jun 18 08:50:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 165419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 479B2B72C3 for ; Mon, 18 Jun 2012 18:52:09 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1A0F58C721; Mon, 18 Jun 2012 08:52:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lfXvDOMmI-50; Mon, 18 Jun 2012 08:51:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7E4908D03F; Mon, 18 Jun 2012 08:51:45 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 862CC8F753 for ; Mon, 18 Jun 2012 08:51:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4D2C48CFA6 for ; Mon, 18 Jun 2012 08:51:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uSCL7igoROEY for ; Mon, 18 Jun 2012 08:51:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by whitealder.osuosl.org (Postfix) with ESMTP id 942558CE0D for ; Mon, 18 Jun 2012 08:51:11 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id EA31E176; Mon, 18 Jun 2012 10:51:02 +0200 (CEST) Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 71A591DD for ; Mon, 18 Jun 2012 10:50:50 +0200 (CEST) From: Maxime Ripard To: buildroot@busybox.net Date: Mon, 18 Jun 2012 10:50:51 +0200 Message-Id: <04cbd51ebed54c86ccf8fc03a3fc2eed1383893b.1340009350.git.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH 2/2] Add systemd unit for lighttpd X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Maxime Ripard --- package/lighttpd/lighttpd.mk | 11 +++++++++++ package/lighttpd/lighttpd.service | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 package/lighttpd/lighttpd.service diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index c7fae32..2caccd0 100644 --- a/package/lighttpd/lighttpd.mk +++ b/package/lighttpd/lighttpd.mk @@ -88,6 +88,17 @@ endef LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG +define LIGHTTPD_INSTALL_INIT_SYSTEMD + [ -f $(TARGET_DIR)/etc/systemd/system/lighttpd.service ] || \ + $(INSTALL) -D -m 755 package/lighttpd/lighttpd.service \ + $(TARGET_DIR)/etc/systemd/system/lighttpd.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../lighttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service +endef + define LIGHTTPD_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/lighttpd rm -f $(TARGET_DIR)/usr/sbin/lighttpd-angel diff --git a/package/lighttpd/lighttpd.service b/package/lighttpd/lighttpd.service new file mode 100644 index 0000000..0ca5357 --- /dev/null +++ b/package/lighttpd/lighttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lighttpd Web Server +After=network.target + +[Service] +ExecStart=/usr/sbin/lighttpd-angel -f /etc/lighttpd/lighttpd.conf -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target