From 23c57ff24840c6f612ffd19effbac70a2c218865 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Fri, 15 Jan 2016 19:27:34 +0100 Subject: cern-scripts: package --- .../cern-scripts/src/main/resources/bin/restart-gwt.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 packages/cern-scripts/src/main/resources/bin/restart-gwt.sh (limited to 'packages/cern-scripts/src/main/resources/bin/restart-gwt.sh') diff --git a/packages/cern-scripts/src/main/resources/bin/restart-gwt.sh b/packages/cern-scripts/src/main/resources/bin/restart-gwt.sh new file mode 100755 index 0000000..3870874 --- /dev/null +++ b/packages/cern-scripts/src/main/resources/bin/restart-gwt.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -x +pid=`jps | grep DevMode | cut -f 1 -d ' '` +if [ -z "$pid" ]; then + echo "no running gwt-client found" >&2 + exit 1 +fi + +cwd=`readlink "/proc/${pid}/cwd"` +cmd=`cat "/proc/${pid}/cmdline" | tr '\0' ' '` +cd "$cwd" +kill -9 "$pid" + +sleep 1 +$cmd >/dev/null 2>&1 & +disown -ar -- cgit v1.2.1