mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 20:36:40 +02:00
Squashed commit of the following:
commit af0dae99cda7c1b0c4fa725aa59a853a65644920
Author: Terra <alpine-builder@spunky.tech.futurequest.net>
Date: Thu May 13 05:45:50 2021 -0700
commit 975ea029e145c097944f5d42c30c3d1a7882418f
Author: Terra <alpine-builder@spunky.tech.futurequest.net>
Date: Thu May 13 05:45:10 2021 -0700
testing/nullmailer: Add more comprehensive /etc/init.d/nullmailer
commit e7b93f65eeed56e6087942d93359f2d8a1199e40
Author: Terra <alpine-builder@spunky.tech.futurequest.net>
Date: Thu May 13 05:41:56 2021 -0700
testing/nullmailer: Fix install warning regarding missing embedded checksums
ref: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10031
commit 5bec89525c4a4a017d605ac325230cd1a9b6b3ea
Author: Terra <alpine-builder@spunky.tech.futurequest.net>
Date: Thu May 13 05:38:26 2021 -0700
testing/nullmailer: Fix various test issues
commit e288818ee33f54c798e2f279cf02612ebe3b51f0
Author: Terra <alpine-builder@spunky.tech.futurequest.net>
Date: Thu May 13 05:34:55 2021 -0700
testing/nullmailer: Replace remotes.conf with a more descriptive version
46 lines
760 B
Plaintext
46 lines
760 B
Plaintext
#!/sbin/openrc-run
|
|
supervisor=supervise-daemon
|
|
|
|
name=nullmailer
|
|
description="Nullmailer relay-only MTA"
|
|
|
|
command=/usr/sbin/nullmailer-send
|
|
|
|
depend() {
|
|
use net logger
|
|
}
|
|
|
|
checkconfig() {
|
|
local error=0
|
|
local f=/etc/nullmailer/me
|
|
if [ ! -s ${f} ]; then
|
|
eerror "${f} does not exist"
|
|
error=1
|
|
fi
|
|
f=/etc/nullmailer/defaultdomain
|
|
if [ ! -s ${f} ]; then
|
|
eerror "${f} does not exist"
|
|
error=1
|
|
fi
|
|
if [ ${error} -eq 1 ]; then
|
|
einfo "You need to run 'emerge --config nullmailer'!"
|
|
fi
|
|
if [ -e /service/nullmailer ]; then
|
|
eerror "Nullmailer is already running under svscan!"
|
|
error=2
|
|
fi
|
|
if [ ${error} -ne 0 ]; then
|
|
return 1
|
|
else
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
start_pre() {
|
|
checkconfig
|
|
}
|
|
|
|
stop_pre() {
|
|
checkconfig # to avoid init.d stopping svscan instance
|
|
}
|