From patchwork Sat May 23 10:14:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Suykov X-Patchwork-Id: 475893 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 24D8F1402CD for ; Sat, 23 May 2015 20:15:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fRXAPN0r; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4D70D8C671; Sat, 23 May 2015 10:15:01 +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 h+JMb6Wjq2dm; Sat, 23 May 2015 10:14:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 0CCEA8C5F5; Sat, 23 May 2015 10:14:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E7D5F1C22B3 for ; Sat, 23 May 2015 10:14:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E268530CAE for ; Sat, 23 May 2015 10:14:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4H1pGZmuBdZY for ; Sat, 23 May 2015 10:14:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by silver.osuosl.org (Postfix) with ESMTPS id E95B230CAB for ; Sat, 23 May 2015 10:14:48 +0000 (UTC) Received: by lagv1 with SMTP id v1so26320460lag.3 for ; Sat, 23 May 2015 03:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=K8W58b1VbkIIE8CpHfPX7jG+Fc38SxSH1yHiRQi2nwg=; b=fRXAPN0rPHH/DDLUaP+ri6H9rNQdhGJ6HUJ8pS1r2ExmojdregcREeuygXHOMupznA xYt0XWSXuwLRWx7UOy4ZBOroDmi45GSKY0JalCRpWcz+7VLeaphrVZ56b2IGNh/oagQ0 H2TilUjCJy/ylSbnMaC40qyKNqRyto7mLshy/JyhpCdZX0qhCPSd20aEA4ObV+ZtoUFl RjOsr/IQHWkExq6OOHerN7ULjQEaGgzNX2ppeyEPURPuVUIFL4eJpD2Nhw1QJCd6jkXX 1Qta+nj/pyC8X+nfPac4bVJfDZ87vjyMLNiGk31itAGZwIMmqAp+tYwkE18aqSlEznIc rGcQ== X-Received: by 10.112.77.103 with SMTP id r7mr9823354lbw.63.1432376087338; Sat, 23 May 2015 03:14:47 -0700 (PDT) Received: from localhost ([188.163.79.70]) by mx.google.com with ESMTPSA id xg8sm1095034lac.17.2015.05.23.03.14.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 May 2015 03:14:46 -0700 (PDT) Date: Sat, 23 May 2015 13:14:18 +0300 From: Alex Suykov To: buildroot@buildroot.org Message-ID: <90fc7e95622b1b99fc97114e32d84798004f5afa.1432332802.git.alex.suykov@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [Buildroot] [PATCH 35/38] supervisor: systemd support 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: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Running supervisord under systemd sounds wrong, but it is possible and probably makes sense in some cases. Signed-off-by: Alex Suykov --- package/supervisor/supervisor.mk | 8 ++++++++ package/supervisor/supervisord.service | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 package/supervisor/supervisord.service diff --git a/package/supervisor/supervisor.mk b/package/supervisor/supervisor.mk index 6bd64a9..43940e3 100644 --- a/package/supervisor/supervisor.mk +++ b/package/supervisor/supervisor.mk @@ -22,4 +22,12 @@ define SUPERVISOR_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S99supervisord endef +define SUPERVISOR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/supervisor/supervisord.service \ + $(TARGET_DIR)/usr/lib/systemd/system/supervisord.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf /usr/lib/systemd/system/supervisord.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/supervisord.service +endef + $(eval $(python-package)) diff --git a/package/supervisor/supervisord.service b/package/supervisor/supervisord.service new file mode 100644 index 0000000..92c38c7 --- /dev/null +++ b/package/supervisor/supervisord.service @@ -0,0 +1,10 @@ +[Unit] +Description=Process Control System +After=syslog.target + +[Service] +ExecStart=/usr/bin/supervisord -n +Restart=always + +[Install] +WantedBy=multi-user.target