annotate bin/ntstop @ 4:aa38447a4b21

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