diff options
author | opal hart <opal@wowana.me> | 2018-10-31 06:47:33 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-11-01 15:29:26 +0000 |
commit | 262b38de90060adb6cd3601ae7184d6551473912 (patch) | |
tree | debc73ab976e42cd0548cf3204cbe658ef683987 /testing/i2pd/i2pd.initd | |
parent | 53c40f97a7885b8daa780524ab5cd1c5872b9656 (diff) | |
download | aports-262b38de90060adb6cd3601ae7184d6551473912.tar.bz2 aports-262b38de90060adb6cd3601ae7184d6551473912.tar.xz |
testing/i2pd: Allow for use with syslog
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.
Diffstat (limited to 'testing/i2pd/i2pd.initd')
-rw-r--r-- | testing/i2pd/i2pd.initd | 7 |
1 files changed, 4 insertions, 3 deletions
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}" } |