From patchwork Fri Mar 20 19:14:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Williams X-Patchwork-Id: 452776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 6545C140140 for ; Sat, 21 Mar 2015 06:15:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A8C63A4168; Fri, 20 Mar 2015 19:15:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0AJp02QdLKi4; Fri, 20 Mar 2015 19:15:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C0809A4198; Fri, 20 Mar 2015 19:15:21 +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 EF39C1C2357 for ; Fri, 20 Mar 2015 19:14:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EC29A926B2 for ; Fri, 20 Mar 2015 19:14:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hp+Wrd5VYqZc for ; Fri, 20 Mar 2015 19:14:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com [209.85.160.181]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4E121926AE for ; Fri, 20 Mar 2015 19:14:54 +0000 (UTC) Received: by ykfs63 with SMTP id s63so47270758ykf.2 for ; Fri, 20 Mar 2015 12:14:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4fe+JVCaQgHlUudsr8HNSGFDjgBFtKPJPF42DFmhGoM=; b=R1HR9guqdoGW5WFIuunkd5BOrQtxBMMjoJk4n0WsKY6YHiaSP0F87gXsjlpOV5BrBV rkCY0DMV0gFn9msaOMDGYjbmXLTL4yiXTLcv3bcScfg7n67h8QK3ML0yBymHNbPhX/7+ 6+3sthWpG/Rz8bwE+R4XgkmYJ4NJadZnzd6DIPWhJmbLeGW14M9PG+iMDieTk8bj9ifP rO5QTN6ATkI2kVbB/1PTbywWuwKHvAQtu6X2ffhUs74ndqM6OiFsaL0lIoAMliJHfqO5 8AtRhPa9rxwaYo4bbFLavSeo2kPtDBNK7Kn9+mnNQgRS3h/ocesoxcRYNVaBI7Q5RjjW fx1Q== X-Gm-Message-State: ALoCoQmf1Kw5GvzPdGN/6Q0wOTZxsA60u+A4KKI2iXvEQwve4F8DZin4y+2UxrpjkQ16h8aMk8lu X-Received: by 10.236.17.163 with SMTP id j23mr84864175yhj.138.1426878893667; Fri, 20 Mar 2015 12:14:53 -0700 (PDT) Received: from mikework.lifesafer.com (FUSE-DEDICATED-66-42-228-99.fuse.net. [66.42.228.99]) by mx.google.com with ESMTPSA id c5sm4193119yhf.29.2015.03.20.12.14.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Mar 2015 12:14:52 -0700 (PDT) From: Mike Williams To: buildroot@busybox.net Date: Fri, 20 Mar 2015 15:14:11 -0400 Message-Id: <1426878856-15747-21-git-send-email-mike@mikebwilliams.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426878856-15747-1-git-send-email-mike@mikebwilliams.com> References: <1426878856-15747-1-git-send-email-mike@mikebwilliams.com> Subject: [Buildroot] [PATCH v2 20/25] thttpd: add systemd service file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Based on Arch service file, adjusted to point to /usr/sbin. Signed-off-by: Mike Williams --- package/thttpd/thttpd.mk | 8 ++++++++ package/thttpd/thttpd.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/thttpd/thttpd.service diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk index 1a028c8..5b4b0c4 100644 --- a/package/thttpd/thttpd.mk +++ b/package/thttpd/thttpd.mk @@ -44,4 +44,12 @@ define THTTPD_INSTALL_INIT_SYSV $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd endef +define THTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/thttpd/thttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/thttpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/thttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/thttpd.service +endef + $(eval $(autotools-package)) diff --git a/package/thttpd/thttpd.service b/package/thttpd/thttpd.service new file mode 100644 index 0000000..e3c93e7 --- /dev/null +++ b/package/thttpd/thttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP Daemon + +[Service] +PIDFile=/run/thttpd.pid +ExecStart=/usr/sbin/thttpd -D -C /etc/thttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target