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