summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2016-02-21 19:45:51 +0000
committerPatrice Clement <monsieurp@gentoo.org>2016-03-09 17:13:47 +0000
commiteb28ed4ff50815fc3b41354ad9e61acef8b284c4 (patch)
tree01d4d61a577bfed5e6f3c25d9e2454a01258273f /net-irc
parentnet-irc/irker: irk and irkerhook.py are not python3 friendly (diff)
downloadgentoo-eb28ed4ff50815fc3b41354ad9e61acef8b284c4.tar.gz
gentoo-eb28ed4ff50815fc3b41354ad9e61acef8b284c4.tar.bz2
gentoo-eb28ed4ff50815fc3b41354ad9e61acef8b284c4.zip
net-irc/irker: Default logging is now syslog instead of file
This behaviour appeared in version 2.9. Handle IRKERD_LOGFILE checkpath only when IRKERD_LOGFILE is defined as IRKERD_LOGLEVEL is independant. Package-Manager: portage-2.2.26
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/irker/files/irkerd.confd5
-rw-r--r--net-irc/irker/files/irkerd.initd10
2 files changed, 4 insertions, 11 deletions
diff --git a/net-irc/irker/files/irkerd.confd b/net-irc/irker/files/irkerd.confd
index f176e6246b36..42ae7323612a 100644
--- a/net-irc/irker/files/irkerd.confd
+++ b/net-irc/irker/files/irkerd.confd
@@ -6,14 +6,13 @@
# Nick-Server password
# IRKERD_PASSWORD=""
-# Log file, intended for debug purpose only, no logrotate will
-# handle this logfile
+# Log file, if none syslog is used (facility daemon)
# IRKERD_LOGFILE=""
# Debug Level (critical, error, warning, info, debug)
# IRKERD_LOGLEVEL=""
-# To run an anonymous irkerd safely. It should not able able
+# To run an anonymous irkerd safely. It should not be able
# to write to anywhere on your system
# IRKERD_USER=""
diff --git a/net-irc/irker/files/irkerd.initd b/net-irc/irker/files/irkerd.initd
index 246fcf4823b9..2ea6a44759f5 100644
--- a/net-irc/irker/files/irkerd.initd
+++ b/net-irc/irker/files/irkerd.initd
@@ -7,8 +7,6 @@
: ${IRKERD_NICK:=}
: ${IRKERD_PASSWORD:=}
-: ${IRKERD_LOGFILE:=/var/log/${RC_SVCNAME}.log}
-: ${IRKERD_LOGLEVEL:=0}
: ${IRKERD_USER:=nobody}
depend() {
@@ -16,12 +14,7 @@ depend() {
}
start () {
- if [[ ${IRKERD_LOGLEVEL} ]] ; then
- IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
-
- ewarn "IRKERD_LOGLEVEL is intended to be used for debugging purpose only"
- ewarn "No logrotate can handle ${IRKERD_LOGFILE}"
-
+ if [[ ${IRKERD_LOGFILE} ]] ; then
checkpath -f \
-o "${IRKERD_USER}" \
"${IRKERD_LOGFILE}" \
@@ -32,6 +25,7 @@ start () {
die "IRKERD_USER is mandatory"
fi
+ [[ -n "${IRKERD_LOGLEVEL}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
[[ -n "${IRKERD_LOGFILE}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
[[ -n "${IRKERD_NICK}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
[[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"