From patchwork Fri Mar 23 09:26:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 148417 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 DCEE3B6EF3 for ; Fri, 23 Mar 2012 20:28:46 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C8ACB8F967; Fri, 23 Mar 2012 09:28:42 +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 tEfoGiReYOnO; Fri, 23 Mar 2012 09:28:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8078C8F88E; Fri, 23 Mar 2012 09:28:07 +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 5E6E08F753 for ; Fri, 23 Mar 2012 09:27:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D2A708E818 for ; Fri, 23 Mar 2012 09:27:09 +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 ZY6qOn4o6-Ic for ; Fri, 23 Mar 2012 09:27:02 +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 D250C8F73C for ; Fri, 23 Mar 2012 09:27:01 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 5866B1CF; Fri, 23 Mar 2012 10:26:50 +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 CA8DB1A5 for ; Fri, 23 Mar 2012 10:26:30 +0100 (CET) From: Maxime Ripard To: buildroot@busybox.net Date: Fri, 23 Mar 2012 10:26:22 +0100 Message-Id: <4d4d0da6e28e15ee0255e89c9e6741b4c990fb44.1332494567.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