c2fc9fb467de38d89b7a9418169be9013e3210e7
[ira/wip.git] / packaging / SGI / startswat.sh
1 #! /bin/sh
2 #
3 # add SWAT deamon to inetd.conf
4 #
5 cp /etc/inetd.conf /etc/inetd.O
6 sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.O > /etc/inetd.conf
7 echo '#SWAT services' >> /etc/inetd.conf
8 echo swat stream tcp  nowait  root    /usr/samba/bin/swat swat >> /etc/inetd.conf
9
10 #
11 # add SWAT service port to /etc/services
12 #
13 cp /etc/services /etc/services.O
14 sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
15 echo '#SWAT services' >> /etc/services
16 echo 'swat              901/tcp                         # SWAT' >> /etc/services
17
18 #
19 # restart inetd to start SWAT
20 #
21 /etc/killall -HUP inetd