forked from pool/fetchmail
Accepting request 492643 from home:pmonrealgonzalez:branches:server:mail
- Allow --syslog option in daemon mode (bsc#1033081). * By default, the status messages are redirected to the syslog. OBS-URL: https://build.opensuse.org/request/show/492643 OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=74
This commit is contained in:
parent
d31f7e58cc
commit
32866745b4
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 28 13:55:29 UTC 2017 - pmonrealgonzalez@suse.com
|
||||||
|
|
||||||
|
- Allow --syslog option in daemon mode (bsc#1033081).
|
||||||
|
* By default, the status messages are redirected to the syslog.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 31 06:17:12 UTC 2017 - meissner@suse.com
|
Fri Mar 31 06:17:12 UTC 2017 - meissner@suse.com
|
||||||
|
|
||||||
|
@ -2,20 +2,26 @@
|
|||||||
# fetchmail-systemd-exec: sysconfig helper script for systemd
|
# fetchmail-systemd-exec: sysconfig helper script for systemd
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&2
|
||||||
exit 5 # closest thing among fetchmail's exit codes
|
exit 5 # closest thing among fetchmail's exit codes
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "$FETCHMAIL_POLLING_INTERVAL" | grep -Eq '^[0-9]+$' \
|
echo "$FETCHMAIL_POLLING_INTERVAL" | grep -Eq '^[0-9]+$' \
|
||||||
|| die 'invalid $FETCHMAIL_POLLING_INTERVAL setting'
|
|| die 'invalid $FETCHMAIL_POLLING_INTERVAL setting'
|
||||||
[ -r "$FETCHMAIL_RC_PATH" ] \
|
[ -r "$FETCHMAIL_RC_PATH" ] \
|
||||||
|| die '$FETCHMAIL_RC_PATH does not exist or cannot be read'
|
|| die '$FETCHMAIL_RC_PATH does not exist or cannot be read'
|
||||||
|
|
||||||
OPTS="-d $FETCHMAIL_POLLING_INTERVAL"
|
OPTS="-d $FETCHMAIL_POLLING_INTERVAL"
|
||||||
[ "$FETCHMAIL_FETCHALL" = "yes" ] && OPTS="$OPTS -a"
|
[ "$FETCHMAIL_FETCHALL" = "yes" ] && OPTS="$OPTS -a"
|
||||||
[ "$FETCHMAIL_SILENT" = "yes" ] && OPTS="$OPTS -s"
|
[ "$FETCHMAIL_SILENT" = "yes" ] && OPTS="$OPTS -s"
|
||||||
[ "`whoami`" = "fetchmail" -a -z "$FETCHMAILHOME" ] && \
|
[ "`whoami`" = "fetchmail" -a -z "$FETCHMAILHOME" ] && \
|
||||||
export FETCHMAILHOME=/var/lib/fetchmail
|
export FETCHMAILHOME=/var/lib/fetchmail
|
||||||
|
|
||||||
|
if [ "$FETCHMAIL_DEFAULT_LOGFILE" = "syslog" -o "$FETCHMAIL_DEFAULT_LOGFILE" = "" ]; then
|
||||||
|
OPTS="$OPTS --syslog"
|
||||||
|
else
|
||||||
|
OPTS="$OPTS -L $FETCHMAIL_DEFAULT_LOGFILE"
|
||||||
|
fi
|
||||||
|
|
||||||
exec /usr/bin/fetchmail $OPTS $FETCHMAIL_EXPERT_OPTIONS \
|
exec /usr/bin/fetchmail $OPTS $FETCHMAIL_EXPERT_OPTIONS \
|
||||||
-f $FETCHMAIL_RC_PATH -L /var/log/fetchmail
|
-f $FETCHMAIL_RC_PATH
|
||||||
|
@ -27,6 +27,16 @@ FETCHMAIL_FETCHALL="yes"
|
|||||||
#
|
#
|
||||||
FETCHMAIL_SILENT="no"
|
FETCHMAIL_SILENT="no"
|
||||||
|
|
||||||
|
## Type: string
|
||||||
|
## Default: "syslog"
|
||||||
|
## Options: "syslog", "/path/to/file"
|
||||||
|
#
|
||||||
|
# This option allows to redirect status messages in daemon mode to the
|
||||||
|
# specified log file or syslog(3) system if available. If empty, status
|
||||||
|
# messages are redirected syslog.
|
||||||
|
#
|
||||||
|
FETCHMAIL_DEFAULT_LOGFILE="syslog"
|
||||||
|
|
||||||
## Type: string
|
## Type: string
|
||||||
## Default: ""
|
## Default: ""
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user