Create a toplevel delete-later dir and put databases/ and admin/ into it

This commit is contained in:
Jon Trulson
2021-07-03 19:30:22 -06:00
parent 7961d9e2da
commit 39d3a67701
103 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
#! /bin/ksh
#
# Shell script to kill off specified processes
#
# Usage: kfork <process-to-kill> <waiting time before retry>
# check for the optional 3rd parameter
# it will tell how long to wait before
# the next kill attempt
if [ $# -ge 2 ]
then
die_time=$2
else
die_time=1
fi
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
if [ -s /tmp/tmp.$$ ]
then
awk '{print "kill", $1}' /tmp/tmp.$$ | /bin/sh
sleep $die_time # wait for it to die
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
if [ -s /tmp/tmp.$$ ]
then
awk '{print "kill -3", $1}' /tmp/tmp.$$ | /bin/sh
sleep $die_time # wait for it to die
ps ${PS_ALL_FLAG} | grep $1 > /tmp/tmp.$$
if [ -s /tmp/tmp.$$ ]
then
awk '{print "kill -9", $1}' /tmp/tmp.$$ | /bin/sh
fi
rm /tmp/tmp.$$
fi
if [ -f /tmp/tmp.$$ ]
then
rm /tmp/tmp.$$
fi
fi
if [ -f /tmp/tmp.$$ ]
then
rm /tmp/tmp.$$
fi