From patchwork Thu Mar 19 19:57:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Williams X-Patchwork-Id: 452206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 9D61B1400EA for ; Fri, 20 Mar 2015 06:58:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F231F959BA; Thu, 19 Mar 2015 19:58:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QuosRly4VRdY; Thu, 19 Mar 2015 19:58:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E7D8F95954; Thu, 19 Mar 2015 19:58:04 +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 C448A1C22B6 for ; Thu, 19 Mar 2015 19:58:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C025292409 for ; Thu, 19 Mar 2015 19:58:03 +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 t+dtzRhyRkQA for ; Thu, 19 Mar 2015 19:58:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yh0-f45.google.com (mail-yh0-f45.google.com [209.85.213.45]) by whitealder.osuosl.org (Postfix) with ESMTPS id F0AB69241A for ; Thu, 19 Mar 2015 19:58:02 +0000 (UTC) Received: by yhim52 with SMTP id m52so1986526yhi.2 for ; Thu, 19 Mar 2015 12:58:02 -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; bh=DNCaC4xigJEgcJzfTdlkEvgCx6JfDzpy9PtpormXQrw=; b=hbmVPf5uwQiOlBzEE9xWteXXVL5GjouSUB3XW25/NYxj18IC4op7IV8hiZL4Qcg9ZC 1BVM1zsmpSGwyXPn39Qo/lcwicwOEKeFs1LUyT4/kr7w4hG2Vbth9ka9tfSetunXzQBf Ne/nIdnR+MAYvn/OuwJhP1PcGd6/W2MTwRgdAd4rFJofIZRBBBmdtM/BZUE2ehZ8rXm2 BKSfC4vBWg0AvrVt6vVLYAIaCpnl3MJIaKCc6vzaywe5VAjASHpU6BiIwz6N/N0sIRoA XtrTW7kqc3JUvS1afyqaFIrP5PbjScc9ThOf1Ejy9ZVnPU+1zqZxeM6+JXcpu78gXfNp PwNg== X-Gm-Message-State: ALoCoQlqarMTnj9nUywIkQw+uMC5sPil5LDkGCJCVMu8M65lcvHwA+lu9MYl95z8O1DqjNd+SfGG X-Received: by 10.170.211.4 with SMTP id c4mr47873877ykf.15.1426795082262; Thu, 19 Mar 2015 12:58:02 -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 t2sm1763070yhp.46.2015.03.19.12.58.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 12:58:01 -0700 (PDT) From: Mike Williams To: buildroot@busybox.net Date: Thu, 19 Mar 2015 15:57:54 -0400 Message-Id: <1426795074-9129-1-git-send-email-mike@mikebwilliams.com> X-Mailer: git-send-email 2.1.0 Subject: [Buildroot] [PATCH] 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, adjust to point to /usr/sbin. Signed-off-by: Mike Williams --- package/thttpd/thttpd.mk | 5 +++++ package/thttpd/thttpd.service | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 package/thttpd/thttpd.service diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk index 1a028c8..565ade6 100644 --- a/package/thttpd/thttpd.mk +++ b/package/thttpd/thttpd.mk @@ -44,4 +44,9 @@ 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 + 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