Last change
on this file since 225 was 27, checked in by rainer, 19 years ago |
Support for server-to-server relay and more user policies
|
File size:
1.4 KB
|
Line | |
---|
1 | #! /bin/sh
|
---|
2 | #
|
---|
3 | # Copyright Rainer Wichmann (2005)
|
---|
4 | #
|
---|
5 | # License Information:
|
---|
6 | # This program is free software; you can redistribute it and/or modify
|
---|
7 | # it under the terms of the GNU General Public License as published by
|
---|
8 | # the Free Software Foundation; either version 2 of the License, or
|
---|
9 | # (at your option) any later version.
|
---|
10 | #
|
---|
11 | # This program is distributed in the hope that it will be useful,
|
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | # GNU General Public License for more details.
|
---|
15 | #
|
---|
16 | # You should have received a copy of the GNU General Public License
|
---|
17 | # along with this program; if not, write to the Free Software
|
---|
18 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | #
|
---|
20 |
|
---|
21 | name=`./samhain-install.sh --print-config name`
|
---|
22 | sbin=`./samhain-install.sh --print-config sbin_dir`
|
---|
23 |
|
---|
24 | MONIT=""
|
---|
25 | test -f /usr/local/bin/monit && MONIT="/usr/local/bin/monit"
|
---|
26 | if test x"$MONIT" = x
|
---|
27 | then
|
---|
28 | test -f /usr/bin/monit && MONIT="/usr/bin/monit"
|
---|
29 | if test x"$MONIT" = x
|
---|
30 | then
|
---|
31 | :
|
---|
32 | else
|
---|
33 | zz=`/usr/bin/monit status | grep ${name}`
|
---|
34 | if test x"$zz" = x
|
---|
35 | then
|
---|
36 | :
|
---|
37 | else
|
---|
38 | ${MONIT} stop "${name}"
|
---|
39 | exit 0
|
---|
40 | fi
|
---|
41 | fi
|
---|
42 | fi
|
---|
43 |
|
---|
44 | if test -f /etc/init.d/${name}
|
---|
45 | then
|
---|
46 | /etc/init.d/${name} stop
|
---|
47 | elif test -f /etc/rc.d/init.d/${name}
|
---|
48 | then
|
---|
49 | /etc/rc.d/init.d/${name} stop
|
---|
50 | else
|
---|
51 | if test -f $sbin/$name
|
---|
52 | then
|
---|
53 | $sbin/$name stop
|
---|
54 | fi
|
---|
55 | fi
|
---|
56 |
|
---|
57 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.