1 |
Mike Kazantsev wrote: |
2 |
|
3 |
>> # /etc/init.d/MailScanner stop |
4 |
>> * Stopping MailScanner... |
5 |
>> * MailScanner: caught SIGTERM, aborting |
6 |
> |
7 |
> Looks like there's a line in "stop" section that kills the script |
8 |
> itself. Try looking for a lines like these: |
9 |
> pkill MailScanner |
10 |
> killall MailScanner |
11 |
> start-stop-daemon --stop --name MailScanner |
12 |
|
13 |
The /etc/init.d/MailScanner script looks so: |
14 |
---------------------------------- |
15 |
#!/sbin/runscript |
16 |
opts="${opts} reload" |
17 |
depend() { |
18 |
need net mta |
19 |
use logger dns } |
20 |
|
21 |
start() { |
22 |
ebegin "Starting MailScanner" |
23 |
/usr/sbin/check_MailScanner >/dev/null |
24 |
RETVAL=$? |
25 |
[ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner |
26 |
[ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner.off |
27 |
eend ${RETVAL} |
28 |
} |
29 |
|
30 |
stop() { |
31 |
ebegin "Stopping MailScanner" |
32 |
killall -15 MailScanner |
33 |
RETVAL=$? |
34 |
[ ${RETVAL} -eq 0 ] && rm -f /var/lock/subsys/MailScanner |
35 |
[ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/MailScanner.off |
36 |
eend ${RETVAL} |
37 |
} |
38 |
# restart () {} and reload () {} removed |
39 |
---------------------------------- |
40 |
|
41 |
> Sure, they might be killing the app as well (if the process has |
42 |
> MailScanner in it's name), but there should be full path or pid-based |
43 |
> line instead, so the initscript will exit cleanly. |
44 |
> |
45 |
>> # /etc/init.d/MailScanner start |
46 |
>> * WARNING: MailScanner has already been started |
47 |
> |
48 |
> Following command should "wipe" initscript memory: |
49 |
> |
50 |
> /etc/init.d/MailScanner zap |
51 |
|
52 |
Yes, this works. But as you said, it is just workaround. Not very |
53 |
clean solution... |
54 |
|
55 |
>> Actually, MailScanner stops, but sendmail which has been |
56 |
>> started by MailScanner init script is still there running: |
57 |
>> |
58 |
>> # ps -e | grep sendmail |
59 |
>> 18676 ? 00:00:00 sendmail |
60 |
>> 18679 ? 00:00:00 sendmail |
61 |
> |
62 |
> Could be because of aforementioned script "self-destruction". |
63 |
> If sendmail really started by the same script, not as a dependency, |
64 |
> that is. |
65 |
|
66 |
Don't know exactly how sendmail is started, but according to |
67 |
MailScanner install messages, I had to remove it from default |
68 |
runlevel. MailScanner itself takes care of starting sendmail... |
69 |
|
70 |
Jarry |
71 |
|
72 |
-- |
73 |
_______________________________________________________________ |
74 |
This mailbox accepts e-mails only from selected mailing-lists! |
75 |
Everything else is considered to be spam and therefore deleted. |