Browse Source

change setup from python to shell

Keenan Brock 10 years ago
parent
commit
a21dfc7149

+ 1 - 1
frameworks/Ruby/ngx_mruby/bash_profile.sh

@@ -1,4 +1,4 @@
 #!/bin/bash
 
 export MRUBY_HOME=${IROOT}/nginx_mruby
-#source $HOME/.rvm/scripts/rvm
+source $HOME/.rvm/scripts/rvm

+ 0 - 11
frameworks/Ruby/ngx_mruby/setup.py

@@ -1,11 +0,0 @@
-import subprocess
-
-def start(args, logfile, errfile):
-  subprocess.Popen('sudo /usr/local/nginx_mruby/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes ' + str((args.max_threads)) + ';"', shell=True, cwd="ngx_mruby", stderr=errfile, stdout=logfile)
-
-  return 0
-
-def stop(logfile, errfile):
-  subprocess.Popen('sudo /usr/local/nginx_mruby/sbin/nginx -c $TROOT/nginx.conf -s stop', shell=True, cwd="ngx_mruby", stderr=errfile, stdout=logfile)
-
-  return 0

+ 6 - 0
frameworks/Ruby/ngx_mruby/setup.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+sed -i 's|CWD|'"${TROOT}"'|g' nginx.conf
+sed -i 's|DBHOSTNAME|'"${DBHOST}"'|g' nginx.conf
+
+${MRUBY_HOME}/sbin/nginx -c $TROOT/nginx.conf -g "worker_processes '"${MAX_THREADS}"';" &

+ 2 - 1
toolset/setup/linux/webservers/nginx_mruby.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PREFIX=/usr/local/nginx_mruby
+PREFIX=${IROOT}/nginx_mruby
 
 RETCODE=$(fw_exists ${IROOT}/nginx_mruby.installed)
 [ ! "$RETCODE" == 0 ] || { return 0; }
@@ -27,5 +27,6 @@ git submodule update
 # fi
 
 NGINX_CONFIG_OPT_ENV="--prefix=${PREFIX} --with-http_stub_status_module" sh build.sh
+sudo make install
 
 touch ${IROOT}/nginx_mruby.installed