X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mx1.volatile.bz (unknown [185.163.46.138]) by lists.alpinelinux.org (Postfix) with ESMTP id 9C17D5C64B3 for ; Wed, 31 Oct 2018 06:53:58 +0000 (GMT) Received: from clamav.local (unknown [198.18.45.2]) by mx1.volatile.bz (Postfix) with ESMTPSA id E142D20FC for ; Wed, 31 Oct 2018 06:47:43 +0000 (UTC) From: opal hart To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] testing/i2pd: Allow for use with syslog Date: Wed, 31 Oct 2018 06:47:33 +0000 Message-Id: <20181031064733.8502-1-opal@wowana.me> X-Mailer: git-send-email 2.19.1 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MC-Transport: 185.163.46.138 to 74.117.189.116 on Wed Oct 31 08:54:00 2018 +0200 (EET) X-Greylist: Delayed for 00:15:45 by milter-greylist-4.6.2 (lists.alpinelinux.org [0.0.0.0]); Wed, 31 Oct 2018 06:54:01 +0000 (GMT) Currently the init script for i2pd expects I2PD_LOG to be set and proceeds to touch the file on service start. However, i2pd is allowed to log to stdout/syslog which does not require this log file to be created. This patch removes the mandation that I2PD_LOG be set in /etc/conf.d/i2pd and will only touch the file if the log variable is set. For anyone using the default log-to-file settings, there is no noticeable change in functionality. --- testing/i2pd/APKBUILD | 2 +- testing/i2pd/i2pd.initd | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/testing/i2pd/APKBUILD b/testing/i2pd/APKBUILD index 3287151525..c0bf4f6810 100644 --- a/testing/i2pd/APKBUILD +++ b/testing/i2pd/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: l-n-s pkgname=i2pd pkgver=2.21.1 -pkgrel=0 +pkgrel=1 pkgdesc="I2P Router written in C++" url="https://github.com/PurpleI2P/i2pd" arch="all !aarch64" # build fails on aarch64 diff --git a/testing/i2pd/i2pd.initd b/testing/i2pd/i2pd.initd index 16459ecd85..5f4346aba9 100644 --- a/testing/i2pd/i2pd.initd +++ b/testing/i2pd/i2pd.initd @@ -30,13 +30,14 @@ start_pre() { if [ -z "${I2PD_USER}" ] || \ [ -z "${I2PD_GROUP}" ] || \ [ -z "${I2PD_PID}" ] || \ - [ -z "${I2PD_LOG}" ] || \ [ -z "${I2PD_OPTIONS}" ] ; then - eerror "Not all variables I2PD_USER, I2PD_GROUP, I2PD_PID, I2PD_OPTIONS, I2PD_LOG are defined." + eerror "Not all variables I2PD_USER, I2PD_GROUP, I2PD_PID, I2PD_OPTIONS are defined." eerror "Check your /etc/conf.d/i2pd." return 1 fi - checkpath -f -o "${user}" "${I2PD_LOG}" + if [ -n "${I2PD_LOG}" ]; then + checkpath -f -o "${user}" "${I2PD_LOG}" + fi checkpath -d -m 0750 -o "${user}" "${I2PD_PID_DIR}" } -- 2.19.1 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---