3
umask 066 # user read/write
6
echo "*************************************** $*"
11
echo "`basename $0`: $@" 1>&2
16
chooser="/tmp/arb_pids_${USER}_*"
19
echo " This Module tries to save a running database"
20
echo " There may be more than one database server (ARB_NT):"
21
echo " --------------------------------"
23
for i in $chooser ; do
24
/bin/echo " - >" `ls $i` "<";
26
echo " --------------------------------"
29
echo "Please choose one line and enter the rightmost number"
32
if [ ! -f /tmp/arb_pids_${USER}_${ARB_PID} ]; then
33
err "Incorrect Choice"
37
echo "Please enter full path (to save DB):"
40
panicfile="/tmp/arb_panic_${USER}_${ARB_PID}"
42
echo "$FILE" >$panicfile
44
for i in `cat /tmp/arb_pids_${USER}_${ARB_PID}`; do
45
echo "[Sending SIGHUP to pid $i]"
46
if kill -HUP $i 2>/dev/null; then
48
echo "[Process $i accepted HUP]"
53
if [ "$ok" = "false" ]; then
54
err "Sorry could not find a running server"
57
echo "Wait until database is saved (or press <ctrl-c> to abort)"
58
while [ -f $panicfile ]; do
61
if [ -f $panicfile] ; then
63
if [ -f $panicfile] ; then
65
if [ -f $panicfile] ; then
67
if [ -f $panicfile] ; then
76
echo "enter 'kill' if you want to kill the server and its clients"
77
echo "enter 'killall' if you want to kill ALL servers and clients"
81
if [ "$ki" = "kill" ] ; then
82
echo "[Sending SIGTERM to pid $i]"
85
if [ "$ki" = "killall" ] ; then