summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-11-17 09:36:12 +0100
committerAndreas Maunz <andreas@maunz.de>2011-11-17 09:36:12 +0100
commit64e21f3e1916c989786a2c329e922f7932e330ee (patch)
tree1870092dfcfa998f690cf290e9323412f9ee072b
parent025e9ed0ef3aae6cfd0b0f3c2c2e122d50ac008d (diff)
Fixed otkill (ohm port)
-rw-r--r--ot-tools-root.sh2
-rw-r--r--ot-tools-user.sh2
-rwxr-xr-xredis.sh1
3 files changed, 3 insertions, 2 deletions
diff --git a/ot-tools-root.sh b/ot-tools-root.sh
index eec6780..b6ebfcc 100644
--- a/ot-tools-root.sh
+++ b/ot-tools-root.sh
@@ -72,7 +72,7 @@ otreload() {
# Kill the server
otkill() {
sudo killall -u root nginx >/dev/null 2>&1
- sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1"
+ sudo bash -c "source $HOME/.opentox-ui.sh; redis-cli -p $OHM_PORT shutdown >/dev/null 2>&1"
while sudo ps x | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done
while sudo ps x | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done
for p in `pgrep -u root R 2>/dev/null`; do sudo kill -9 $p; done
diff --git a/ot-tools-user.sh b/ot-tools-user.sh
index 64f26d3..ede3d7b 100644
--- a/ot-tools-user.sh
+++ b/ot-tools-user.sh
@@ -72,7 +72,7 @@ otreload() {
# Kill the server
otkill() {
killall nginx >/dev/null 2>&1
- bash -c "source $HOME/.opentox-ui.sh; redis-cli shutdown >/dev/null 2>&1"
+ bash -c "source $HOME/.opentox-ui.sh; redis-cli -p $OHM_PORT shutdown >/dev/null 2>&1"
while ps x | grep PassengerWatchdog | grep -v grep >/dev/null 2>&1; do sleep 1; done
while ps x | grep Rack | grep -v grep >/dev/null 2>&1; do sleep 1; done
for p in `pgrep -u $USER R 2>/dev/null`; do kill -9 $p; done
diff --git a/redis.sh b/redis.sh
index a670cff..ad3b695 100755
--- a/redis.sh
+++ b/redis.sh
@@ -67,6 +67,7 @@ fi
if [ ! -f $REDIS_CONF ]; then
echo "if ! echo \"\$PATH\" | grep \"$REDIS_DEST\">/dev/null 2>&1; then export PATH=$REDIS_DEST/src:\$PATH; fi" >> "$REDIS_CONF"
+ echo "export OHM_PORT=$OHM_PORT" >> "$REDIS_CONF"
echo "Redis configuration has been stored in '$REDIS_CONF'."
if ! grep ". \"$REDIS_CONF\"" $OT_UI_CONF; then