From 456c8cc1448a7f4d83bf5790236d79ebbe9525d9 Mon Sep 17 00:00:00 2001 From: Andreas Maunz Date: Thu, 28 Apr 2011 13:45:33 +0200 Subject: Added tools to README --- README | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README b/README index adb12ed..97becf2 100644 --- a/README +++ b/README @@ -27,3 +27,30 @@ To uninstall the system simply delete the link from the startup file: Done. I gu Anyone who wants can run multiple Opentox versions on the same machine: Just install again, but to a different OT_PREFIX. The switch works manually: Include the sh__ot.sh files from the desired OT_PREFIX in ~/opentox-ui.sh (only one installation may be activated at any time). + +Some useful scripts to put in your ~/.bashrc in case you are using bash (assuming OT_PREFIX is '~/opentox-ruby'): +# Load server config +alias otconfig='source ~/.opentox-ui.sh' + +# Start the server +otstart() { + sudo killall nginx redis-server>/dev/null 2>&1 + sudo env PATH=$PATH nohup redis-server ~/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 & + sudo env PATH=$PATH nohup nginx -c ~/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 & + sleep 2 + if ! pgrep nginx>/dev/null 2>&1; then echo "Failed to start nginx."; fi + if ! pgrep redis-server>/dev/null 2>&1; then echo "Failed to start redis."; fi +} + +# Reload the server +alias otreload='sudo env PATH=$PATH nginx -s reload' + +# Kill the server +alias otkill='sudo killall nginx redis-server' + +# Display log +alias otless='less /home/am/.opentox/log/production.log' + +# Tail log +alias ottail='tail -f /home/am/.opentox/log/production.log' + -- cgit v1.2.3