updates
This commit is contained in:
parent
d493b877b3
commit
448ebf7cf1
@ -3,10 +3,12 @@ MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk add tzdata rsyslog postfix runit ca-certificates
|
||||
apk add postfix runit socklog tzdata ca-certificates && \
|
||||
rm -rf /etc/service
|
||||
|
||||
# tzdata - for passing TZ environment variable.
|
||||
# rsyslog - to log postfix service into /var/log/maillog file.
|
||||
# socklog - collect all logs which come to /dev/log.
|
||||
|
||||
COPY service /etc/service/
|
||||
COPY service /etc/service
|
||||
ENTRYPOINT runsvdir -P /etc/service
|
||||
#ENTRYPOINT chpst -Unobody socklog unix /dev/log & postfix start-fg
|
||||
|
4
service-disabled/rsyslogd/finish
Executable file
4
service-disabled/rsyslogd/finish
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "${PWD##*/}: Exitted with $1 (signal: $2)"
|
||||
[ $1 -ne 0 ] && ( echo "${PWD##*/}: rc != 0, sleeping for 5 seconds ..."; sleep 5 )
|
@ -1,3 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "${PWD##*/}: started."
|
||||
|
||||
touch /var/log/maillog
|
||||
exec /usr/sbin/rsyslogd -n 2>&1
|
4
service/logger/finish
Executable file
4
service/logger/finish
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "${PWD##*/}: Exitted with $1 (signal: $2)"
|
||||
[ $1 -ne 0 ] && ( echo "${PWD##*/}: rc != 0, sleeping for 5 seconds ..."; sleep 5 )
|
10
service/logger/run
Executable file
10
service/logger/run
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# Collect all logs which come to /dev/log
|
||||
exec 2>&1
|
||||
|
||||
echo "${PWD##*/}: started."
|
||||
|
||||
set -x
|
||||
exec chpst -Unobody socklog unix /dev/log
|
||||
# exec socklog unix /dev/log
|
||||
# exec socat UNIX-LISTEN:/dev/log,reuseaddr,fork -
|
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ $1 -ne 0 ] && ( echo "${PWD##*/}: Exitted with $1 (signal: $2)"; sleep 5 )
|
||||
echo "${PWD##*/}: Exitted with $1 (signal: $2)"
|
||||
[ $1 -ne 0 ] && ( echo "${PWD##*/}: rc != 0, sleeping for 5 seconds ..."; sleep 5 )
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "${PWD##*/}: started."
|
||||
|
||||
# WORKAROUND:
|
||||
# postfix has to be aware of the DNS servers
|
||||
# without this workaround it uses 127.0.0.1:53 for some unknown (yet) reason...
|
||||
@ -13,6 +15,8 @@ set -e
|
||||
postfix check 2>&1
|
||||
|
||||
# run Postfix
|
||||
# exec /usr/lib/postfix/master 2>&1
|
||||
# after postfix 3.3.0 use postfix start-fg command
|
||||
exec postfix start-fg 2>&1
|
||||
exec /usr/lib/postfix/master 2>&1
|
||||
|
||||
# Do not use 'postfix start-fg' command since it does not handle the signals,
|
||||
# e.g. if you do 'sv restart postfix', postfix/master will NOT receive the
|
||||
# SIGTERM signal.
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ $1 -ne 0 ] && ( echo "${PWD##*/}: Exitted with $1 (signal: $2)"; sleep 5 )
|
Loading…
Reference in New Issue
Block a user