diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-04-28 13:45:33 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-04-28 13:45:33 +0200 |
commit | 456c8cc1448a7f4d83bf5790236d79ebbe9525d9 (patch) | |
tree | 4efc29f7dff218b8a082bea4c40b8fb928fce299 /README | |
parent | 7b37b2c92dc746446b6110eab2038254bd704a11 (diff) |
Added tools to README
Diffstat (limited to 'README')
-rw-r--r-- | README | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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_<Package>_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' + |