summaryrefslogtreecommitdiff
path: root/test/stop_scorsh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/stop_scorsh.sh')
-rwxr-xr-xtest/stop_scorsh.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/stop_scorsh.sh b/test/stop_scorsh.sh
new file mode 100755
index 0000000..353b027
--- /dev/null
+++ b/test/stop_scorsh.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+. ./scorsh_functions
+
+## is the daemon running?
+cd ${SCORSH_APP}
+is_running=$(ps $(cat scorsh.pid) | grep -c scorshd )
+cd - >/dev/null
+check "[ \"${is_running}\" = \"1\" ]" $0 "is_scorshd_running"
+
+
+## stop the scorsh daemon
+cd ${SCORSH_APP}
+kill -15 $(cat scorsh.pid)
+ret=$?
+rm scorsh.pid
+cd - >/dev/null
+check "[ $ret -eq 0 ]" $0 ""
+
+return_results