X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 5D3E0DC5944 for ; Wed, 15 Jul 2015 16:53:50 +0000 (UTC) Received: from apollo.thewebhostserver.com (apollomail.thewebhostserver.com [46.23.65.248]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 0C5DDDC14EF for ; Wed, 15 Jul 2015 16:53:49 +0000 (UTC) Received: from [81.4.121.188] (port=51869 helo=localhost.localdomain) by apollo.thewebhostserver.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZFPwI-001m7s-H3; Wed, 15 Jul 2015 17:53:46 +0100 From: Stuart Cardall To: alpine-aports@lists.alpinelinux.org Cc: Stuart Cardall Subject: [alpine-aports] [PATCH 3/3] testing/socklog: add post-install script Date: Wed, 15 Jul 2015 16:53:22 +0000 Message-Id: <1436979202-54739-4-git-send-email-developer@it-offshore.co.uk> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1436979202-54739-1-git-send-email-developer@it-offshore.co.uk> References: <1436979202-54739-1-git-send-email-developer@it-offshore.co.uk> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - apollo.thewebhostserver.com X-AntiAbuse: Original Domain - lists.alpinelinux.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - it-offshore.co.uk X-Get-Message-Sender-Via: apollo.thewebhostserver.com: authenticated_id: developer@it-offshore.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This sets up logging with runit (tested with logs from tinyssh). --- testing/socklog/APKBUILD | 2 +- testing/socklog/socklog.post-install | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 testing/socklog/socklog.post-install diff --git a/testing/socklog/APKBUILD b/testing/socklog/APKBUILD index 66706ea..708035a 100644 --- a/testing/socklog/APKBUILD +++ b/testing/socklog/APKBUILD @@ -7,7 +7,7 @@ pkgdesc="System and kernel logging services for runit" url="http://smarden.org/socklog/" arch="all" license="BSD" -makedepends="$depends_dev" +install="$pkgname.post-install" subpackages="$pkgname-doc" source="http://smarden.org/$pkgname/$pkgname-$pkgver.tar.gz" diff --git a/testing/socklog/socklog.post-install b/testing/socklog/socklog.post-install new file mode 100644 index 0000000..9cfa37f --- /dev/null +++ b/testing/socklog/socklog.post-install @@ -0,0 +1,21 @@ +#!/bin/sh +# Alpine Linux post-install script for socklog +# Copyright 2015 Stuart Cardall (developer@it-offshore.co.uk) +# Distributed under the terms of the GNU General Public License, v2 or later # + +adduser -S -H -h /var/empty -D -s /sbin/nologin log 2>/dev/null +if [ ! -d /etc/sv/socklog-unix ]; then + socklog-conf unix nobody log + mkdir -p /etc/service + ln -s /etc/sv/socklog-unix /etc/service/ +fi + +if [ ! -f /etc/sv/socklog-unix/run ]; then +cat > /etc/sv/socklog-unix/run </dev/null +exec 2>&1 +exec chpst -Unobody socklog unix /dev/log +EOF +fi + -- 2.4.5 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---