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 <supervillain@riseup.net>
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
---