import repository from arizona
[raven.git] / 2.0 / python / logging / .postinstall
1 #!/bin/sh
2
3 # <Program Name>
4 #    .postinstall
5 #
6 # <Author>
7 #    Programmed by Jeffry Johnston
8 #
9 # <Purpose>
10 #    Commands to run after stork logging tarball is extracted
11
12 # create symlink for /etc/init.d
13 /bin/ln -s /etc/rc.d/init.d /etc/init.d &> /dev/null
14
15 # add line to /etc/passwd so that tcpdump works properly
16 /bin/grep pcap /etc/passwd
17 if [ $? -ne "0" ]
18 then
19   echo "pcap:x:77:77::/var/arpwatch:/bin/nologin" >> /etc/passwd
20 fi
21
22 # add crontab entry for log uploading and rotation
23 /usr/bin/crontab -l > /tmp/crontab 
24 /bin/grep storklog /tmp/crontab 
25 if [ $? -ne "0" ]
26 then
27   /usr/bin/crontab /usr/local/stork/bin/logging.crontab
28 fi
29 /bin/rm -f /tmp/crontab
30
31 # start or restart crond
32 /etc/rc.d/init.d/crond restart
33
34 # start or restart tcpdumpd
35 /etc/rc.d/init.d/tcpdumpd restart
36
37 # start or restart straced
38 /etc/rc.d/init.d/straced restart