Rev | Line | |
---|
[1] | 1 | #! /bin/sh
|
---|
| 2 |
|
---|
| 3 | name=`./samhain-install.sh --print-config name`
|
---|
| 4 | sbin=`./samhain-install.sh --print-config sbin_dir`
|
---|
| 5 |
|
---|
| 6 | MONIT=""
|
---|
| 7 | test -f /usr/local/bin/monit && MONIT="/usr/local/bin/monit"
|
---|
| 8 | if test x"$MONIT" = x
|
---|
| 9 | then
|
---|
| 10 | test -f /usr/bin/monit && MONIT="/usr/bin/monit"
|
---|
| 11 | if test x"$MONIT" = x
|
---|
| 12 | then
|
---|
| 13 | :
|
---|
| 14 | else
|
---|
| 15 | zz=`/usr/bin/monit status | grep ${name}`
|
---|
| 16 | if test x"$zz" = x
|
---|
| 17 | then
|
---|
| 18 | :
|
---|
| 19 | else
|
---|
| 20 | ${MONIT} stop "${name}"
|
---|
| 21 | exit 0
|
---|
| 22 | fi
|
---|
| 23 | fi
|
---|
| 24 | fi
|
---|
| 25 |
|
---|
| 26 | if test -f /etc/init.d/${name}
|
---|
| 27 | then
|
---|
| 28 | /etc/init.d/${name} stop
|
---|
| 29 | elif test -f /etc/rc.d/init.d/${name}
|
---|
| 30 | then
|
---|
| 31 | /etc/rc.d/init.d/${name} stop
|
---|
| 32 | else
|
---|
| 33 | if test -f $sbin/$name
|
---|
| 34 | then
|
---|
| 35 | $sbin/$name stop
|
---|
| 36 | fi
|
---|
| 37 | fi
|
---|
| 38 |
|
---|
| 39 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.