aboutsummaryrefslogtreecommitdiff
path: root/network/opensmtpd/rc.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/rc.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/rc.opensmtpd')
-rw-r--r--network/opensmtpd/rc.opensmtpd13
1 files changed, 11 insertions, 2 deletions
diff --git a/network/opensmtpd/rc.opensmtpd b/network/opensmtpd/rc.opensmtpd
index b75e3c53e4e48..f3154061c58df 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