console: add kill_stratum bash script to reload an instance

sample usage: "kill_stratum x11"
This commit is contained in:
Tanguy Pruvot 2017-02-21 17:03:36 +01:00
parent 9d1630c40c
commit 00bafa5892

13
bin/kill_stratum Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
PLINE=$(ps -ef | grep "stratum config/$1" | grep -v grep)
if [ $? ]; then
PS=$(echo $PLINE | cut -d ' ' -f 2)
if [ $PS ]; then
kill $PS
echo "killed stratum process $PS"
else
echo "Process not found"
exit 1
fi
fi