From patchwork Fri Mar 23 15:49:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 148463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3E273B6EE6 for ; Sat, 24 Mar 2012 02:51:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 843C1273A0; Fri, 23 Mar 2012 15:51:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NUR5y30X3b-g; Fri, 23 Mar 2012 15:51:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 01E572747C; Fri, 23 Mar 2012 15:50:43 +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 D61B48F753 for ; Fri, 23 Mar 2012 15:50:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C42C68F48E for ; Fri, 23 Mar 2012 15:50:31 +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 rH4K2q3nRio5 for ; Fri, 23 Mar 2012 15:50:22 +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 6FBE78F72C for ; Fri, 23 Mar 2012 15:50:22 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 95D46177; Fri, 23 Mar 2012 16:50:18 +0100 (CET) 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 44E4F1A5 for ; Fri, 23 Mar 2012 16:50:04 +0100 (CET) From: Maxime Ripard To: buildroot@busybox.net Date: Fri, 23 Mar 2012 16:49:56 +0100 Message-Id: <053f11e835302a883caf833069064f98e32fe4bf.1332517726.git.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH 5/5] 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(+), 0 deletions(-) create mode 100644 package/lighttpd/lighttpd.service diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index 8d1f212..1f2f283 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