network/opensmtpd: Fix pkill, add testconf, to rc init file.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Richard Narron 2023-04-06 22:10:53 +01:00 committed by Willy Sudiarto Raharjo
parent e25f3f4f34
commit 4902427f2d
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 12 additions and 3 deletions

View file

@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=opensmtpd
VERSION=${VERSION:-6.8.0p2}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

View file

@ -10,7 +10,7 @@ smtpd_start() {
smtpd_stop() {
echo "Stopping OpenSMTPD"
/usr/sbin/smtpctl stop 1>/dev/null 2>/dev/null || /usr/bin/pkill smtpd
/usr/bin/pkill -f /usr/sbin/smtpd
}
# Restart smtpd:
@ -20,6 +20,12 @@ smtpd_restart() {
smtpd_start
}
# Test the smtpd configuration:
smtpd_testconf() {
echo "testing OpenSMTPD configuration: /usr/sbin/smtpd -n"
/usr/sbin/smtpd -n
}
case "$1" in
'start')
smtpd_start
@ -30,6 +36,9 @@ case "$1" in
'restart')
smtpd_restart
;;
'testconf')
smtpd_testconf
;;
*)
echo "usage $0 start|stop|restart"
echo "usage $0 start|stop|restart|testconf"
esac