comparison bin/ntstop @ 1:4d6502ffaa5e

Initial revision
author darius
date Sat, 06 Dec 1997 04:36:59 +0000
parents
children
comparison
equal deleted inserted replaced
0:52b8d91ecc32 1:4d6502ffaa5e
1 #!/bin/sh
2 #
3 # shut down the server
4 #
5 # since we don't know who may execute this (if it is called from the system
6 # upon a machine shutdown, for instance), use ../directory notation
7 # rather than ${NETREKDIR}, assuming it is executed in ${NETREKDIR}/bin
8 #
9 # This will blast the daemon and listen process, it will NOT blast any
10 # ntserv processes (wait for them to disconnect or do these by hand)
11 #
12 # if an argument exists it is taken as the NETREKDIR
13 #
14
15 if [ X$1 != X ]; then
16 NETREKDIR=$1
17 elif [ X${NETREKDIR} = X ]; then
18 if [ -f "../etc/conf.netrekdir" ]; then
19 NETREKDIR=`cat "../etc/conf.netrekdir"`
20 else
21 echo "No NETREKDIR variable found, exiting."
22 exit 1
23 fi
24 fi
25
26 SYSTEM=`hostname`
27
28 echo "" > /tmp/$$.ntstop
29 echo "${USER}@${SYSTEM}: ******* IMMINENT SYSTEM SHUTDOWN! *******" >> /tmp/$$.ntstop
30 echo "${USER}@${SYSTEM}: ******* IMMINENT SYSTEM SHUTDOWN! *******" >> /tmp/$$.ntstop
31 echo "" >> /tmp/$$.ntstop
32 ${NETREKDIR}/bin/mes A -w < /tmp/$$.ntstop
33 rm /tmp/$$.ntstop
34 /bin/kill `cat ${NETREKDIR}/logs/listen.pid` 2> /dev/null
35 /bin/kill `cat ${NETREKDIR}/logs/daemonII.pid` 2> /dev/null