* updated knights (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / mail / sendmail / sendmail.init
blob6df464b5ea09345d794d70584a1a6be52181e593
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/sendmail/sendmail.init
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # Desc: the SMTP server
14 # Runlevel: 25 rcX
17 main_begin
19     block_begin(start, `Starting sendmail')
20         if test -x /usr/sbin/sendmail &&
21            grep -q sendmail_sendmail /usr/bin/sendmail
22         then
23                 check(`make -s -C /etc/mail')
24                 check(`D_prefix/sbin/sendmail -bd -q15m')
25         else
26                 echo "Sendmail is not default MTA. Run 'setmailer_sendmail'."
27 IN              error=1
28         fi
29     block_end
31     block_begin(stop, `Stopping sendmail')
32         check(`killall D_prefix/sbin/sendmail_sendmail')
33     block_end
35     block_begin(restart, `Restarting sendmail')
36         check(`killall -1 D_prefix/sbin/sendmail_sendmail')
37     block_end
39 main_end