net-irc/irker: Default logging is now syslog instead of file
authorBertrand Jacquin <bertrand@jacquin.bzh>
Sun, 21 Feb 2016 19:45:51 +0000 (19:45 +0000)
committerPatrice Clement <monsieurp@gentoo.org>
Wed, 9 Mar 2016 17:13:47 +0000 (17:13 +0000)
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

net-irc/irker/files/irkerd.confd
net-irc/irker/files/irkerd.initd

index f176e6246b367d2ccacfd610c68024f67ef18eae..42ae7323612a444d1a97b3233fc110ada1209743 100644 (file)
@@ -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=""
 
index 246fcf4823b97f3eb26d57c85e9be3162202bd2d..2ea6a44759f5e4900822a322173089a85aa59016 100644 (file)
@@ -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}"