source: trunk/dsys/preinstall@ 1

Last change on this file since 1 was 1, checked in by katerina, 19 years ago

Initial import

File size: 653 bytes
RevLine 
[1]1#! /bin/sh
2
3name=`./samhain-install.sh --print-config name`
4sbin=`./samhain-install.sh --print-config sbin_dir`
5
6MONIT=""
7test -f /usr/local/bin/monit && MONIT="/usr/local/bin/monit"
8if test x"$MONIT" = x
9then
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
24fi
25
26if test -f /etc/init.d/${name}
27then
28 /etc/init.d/${name} stop
29elif test -f /etc/rc.d/init.d/${name}
30then
31 /etc/rc.d/init.d/${name} stop
32else
33 if test -f $sbin/$name
34 then
35 $sbin/$name stop
36 fi
37fi
38
39exit 0
Note: See TracBrowser for help on using the repository browser.