15 lines
253 B
Plaintext
Executable File
15 lines
253 B
Plaintext
Executable File
|
|
#!/bin/bash
|
|
pids=($(ps aux |
|
|
grep '[0-9] .*node.* /home/user/client' |
|
|
while read user pid rest; do
|
|
echo $pid;
|
|
done))
|
|
|
|
if [[ "${pids}" != "" ]]; then
|
|
echo "Killing ${pids[@]}."
|
|
kill ${pids[@]}
|
|
else
|
|
echo "Running client not found."
|
|
fi
|