<< | Index | >>
Attach:added-drb_process-switching-by-flavor.patch.txt
specifiy flavor by ARGV
server_uri = ODDB::Flavorlizer.server_uri_with_flavor(ARGV.first) if server_uri == ODDB::SERVER_URI ODBA.cache.setup ODBA.cache.clean_prefetched end
$ bin/oddbd atupri $ bin/oddbd mymedi
lookandfeels are called flavor in URL
z.B.
bin/oddbd
)
http://just-medical.oddb.org/
=> just-medical flavor)http://just-medical.oddb.org/de/gcc/
=> gcc flavor)
installed daemontools via emerge.
#!/bin/sh exec multilog t ./main
#!/bin/sh exec 2>&1 ulimit -v 10240000 exec sudo -u apache /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd
svc -u /service/ch.oddb
-t
+ -c
+ no-restart)
svc -d /service/ch.oddb
svc -t /service/ch.oddb
svc -k /service/ch.oddb
svc -a /service/ch.oddb/log
touch /serive/ch.oddb/down
I created run a script for multi daemons.
But, This way dosen't works.
I could not control each process with svc command.
/var/www/oddb.org/svc/oddb/run
[this does not work]
#!/bin/sh exec 2>&1 ulimit -v 10240000 exec sudo -u yasu /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd # lookandfeels exec sudo -u yasu /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd atupri exec sudo -u yasu /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd atupri-web exec sudo -u yasu /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd carenaschweiz ...
We must run 1 script per 1 daemon
. (we could not run also as child process)
then, created as each service.
#!/bin/sh exec 2>&1 ulimit -v 10240000 exec sudo -u yasu /usr/local/bin/ruby /var/www/oddb.org/bin/oddbd
...
We must run it by these commands.
$ svc -u /service/ch.oddbd $ svc -u /service/ch.oddbd-atupri $ svc -u /service/ch.oddbd-atupri-web $ svc -u /service/ch.oddbd-carenaschweiz ...