From 00bafa5892255c566c0ad9d5524967038475b020 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Tue, 21 Feb 2017 17:03:36 +0100 Subject: [PATCH] console: add kill_stratum bash script to reload an instance sample usage: "kill_stratum x11" --- bin/kill_stratum | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/kill_stratum diff --git a/bin/kill_stratum b/bin/kill_stratum new file mode 100755 index 0000000..4d8d06e --- /dev/null +++ b/bin/kill_stratum @@ -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