28 lines
317 B
Bash
28 lines
317 B
Bash
![]() |
#!/bin/bash
|
||
|
PATH=$PATH:/usr/bin/:/usr/local/bin/:/usr/sbin
|
||
|
dataCenterPath=$1
|
||
|
|
||
|
function killIt()
|
||
|
{
|
||
|
pid=$1
|
||
|
/usr/bin/kill -9 ${pid}
|
||
|
}
|
||
|
|
||
|
function fetch()
|
||
|
{
|
||
|
for file in ${dataCenterPath}/pids/base/*.pid
|
||
|
do
|
||
|
if [ -f "$file" ]
|
||
|
then
|
||
|
killIt $(cat $file) | true
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
function main()
|
||
|
{
|
||
|
fetch
|
||
|
}
|
||
|
|
||
|
main
|