mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
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:
parent
e25f3f4f34
commit
4902427f2d
2 changed files with 12 additions and 3 deletions
|
@ -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}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue