aboutsummaryrefslogtreecommitdiff
path: root/network/opensmtpd
diff options
context:
space:
mode:
authorRichard Narron <richard@aaazen.com>2023-04-06 22:10:53 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-08 09:16:25 +0700
commit4902427f2d4c924bb05bd676a240403d4ae35303 (patch)
tree193e9025e74fb1ae554bcf748591a974b91f4585 /network/opensmtpd
parente25f3f4f34733612dedf820f212a1f827100565a (diff)
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>
Diffstat (limited to 'network/opensmtpd')
-rw-r--r--network/opensmtpd/opensmtpd.SlackBuild2
-rw-r--r--network/opensmtpd/rc.opensmtpd13
2 files changed, 12 insertions, 3 deletions
diff --git a/network/opensmtpd/opensmtpd.SlackBuild b/network/opensmtpd/opensmtpd.SlackBuild
index e97260abd78a..87ba8c4ef27a 100644
--- a/network/opensmtpd/opensmtpd.SlackBuild
+++ b/network/opensmtpd/opensmtpd.SlackBuild
@@ -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}
diff --git a/network/opensmtpd/rc.opensmtpd b/network/opensmtpd/rc.opensmtpd
index b75e3c53e4e4..f3154061c58d 100644
--- a/network/opensmtpd/rc.opensmtpd
+++ b/network/opensmtpd/rc.opensmtpd
@@ -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