diff options
author | David Vorgrimmler <vorgrimmlerdavid@gmx.de> | 2012-04-20 15:46:56 +0200 |
---|---|---|
committer | David Vorgrimmler <vorgrimmlerdavid@gmx.de> | 2012-04-20 15:46:56 +0200 |
commit | 1267aa7feda75a2fcdcaae6761fd9b658520b786 (patch) | |
tree | 2651b226e0725001b8f6a88f5d1f27a9a947556d | |
parent | 8b4eecca7381c8c6fa4e941227058054e40dedf2 (diff) | |
parent | d7c43e8399c64acbc02ce31eb756a347137f0e2c (diff) |
Merge branch 'development' into pc_unified_from_jl
-rw-r--r-- | base-install.sh | 28 | ||||
-rw-r--r-- | nginx.conf | 1 | ||||
-rw-r--r-- | ot-tools-root.sh | 8 |
3 files changed, 20 insertions, 17 deletions
diff --git a/base-install.sh b/base-install.sh index 73c9e37..aed094c 100644 --- a/base-install.sh +++ b/base-install.sh @@ -32,9 +32,15 @@ packs="binutils build-essential git-core gnuplot hostname libcurl4-openssl-dev l echo echo "Base Packages:" +echo +echo "Updating index" +sudo $APTITUDE update -y >/dev/null 2>&1 + +echo +echo "Checking installation:" pack_arr="" for p in $packs; do - if $DPKG -S "$p" >/dev/null 2>&1; then + if [ "un" != `$DPKG -l "$p" 2>/dev/null | tail -1 | awk -F " " '{print $1}'` ]; then printf "%50s%30s\n" "'$p'" "Y" else printf "%50s%30s\n" "'$p'" "N" @@ -45,19 +51,16 @@ done if [ -n "$pack_arr" ]; then echo echo "Checking availablity:" - sudo $APTITUDE update -y >/dev/null 2>&1 -# sudo $APTITUDE upgrade -y >/dev/null 2>&1 + for p in $pack_arr; do + if [ -n "`$APT_CACHE search $p`" ] ; then + printf "%50s%30s\n" "'$p'" "Y" + else + printf "%50s%30s\n" "'$p'" "N" + pack_fail="$pack_fail $p" + fi + done fi -for p in $pack_arr; do - if [ -n "`$APT_CACHE search $p`" ] ; then - printf "%50s%30s\n" "'$p'" "Y" - else - printf "%50s%30s\n" "'$p'" "N" - pack_fail="$pack_fail $p" - fi -done - if [ -n "$pack_fail" ]; then echo echo "WARNING: At least one missing package has no suitable installation candidate." @@ -65,7 +68,6 @@ if [ -n "$pack_fail" ]; then sleep 5 fi -echo sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections echo if [ -n "$pack_arr" ]; then echo "Installing missing packages:" @@ -14,6 +14,7 @@ http { passenger_log_level 2; passenger_spawn_method conservative; #passenger_use_global_queue on; + passenger_max_pool_size 30; include NGINX_DEST/conf/mime.types; default_type application/octet-stream; diff --git a/ot-tools-root.sh b/ot-tools-root.sh index 7e1233b..064ea29 100644 --- a/ot-tools-root.sh +++ b/ot-tools-root.sh @@ -52,8 +52,8 @@ otupdate() { otstart() { otconfig otkill - sudo bash -c "nohup redis-server $HOME/opentox-ruby/redis-2.2.2/redis.conf >/dev/null 2>&1 &" - sudo bash -c "nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" + sudo bash -c "source $HOME/.opentox-ui.sh; nohup redis-server $HOME/opentox-ruby/redis-*/redis.conf >/dev/null 2>&1 &" + sudo bash -c "source $HOME/.opentox-ui.sh; nohup nginx -c $HOME/opentox-ruby/nginx/conf/nginx.conf >/dev/null 2>&1 &" sleep 2 if ! pgrep -u root nginx>/dev/null 2>&1; then echo "Failed to start nginx."; fi if ! pgrep -u root redis-server>/dev/null 2>&1; then echo "Failed to start redis."; fi @@ -68,14 +68,14 @@ alias ottail='tail -f $HOME/.opentox/log/production.log' # Reload the server otreload() { otconfig - sudo bash -c "nginx -s reload" + sudo bash -c "source $HOME/.opentox-ui.sh; nginx -s reload" } # Kill the server otkill() { otconfig sudo killall -u root nginx >/dev/null 2>&1 - sudo bash -c "redis-cli -p $OHM_PORT 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 |