rubygems contains gem_server which starts a web-server that offers rdoc of all installed gems if someone wants to start this server an init-script is handy Reproducible: Always Steps to Reproduce:
Created attachment 126266 [details] /etc/init.d/gem_server init script
Created attachment 126268 [details] /etc/conf.d/gem_server config
Thanks for contributing! I have some questions though. /usr/bin/gem_server is executable. Why do I have to run it via /usr/bin/ruby? I see you define $CONFIG but it does not get used. Am I missing something or is it just bogus? Ah and $PID definition should be moved to /etc/conf.d/gem_server as well, just in case someone wants to change the path. And the initscript should depend on net besides localmount because I don't think gem_server is really useful without a connection. Final note, we also need "Copyright 2007 Gentoo Foundation blah blah..". I hope you don't mind. Sorry I talk too much :-X
I dont remember why i used "ruby gem_server" instead of "gem_server". In the beginning i had problems with start-stop-daemon. I think i used it in a wrong way and one of the things i did to fix my problem was using ruby. It might have been because of the PID-file. If you dont like it try without which might work or not ;). The config is used, try "-p 10000" or something like in the configfile. I dont think the name of the pidfile should be configured by any user. You are right it should depend on net. I dont mind add whatever you need.
I have added the scripts to rubygems-0.9.4-r1. Thank you for contributing. (In reply to comment #4) > I dont remember why i used "ruby gem_server" instead of "gem_server". In the > beginning i had problems with start-stop-daemon. I think i used it in a wrong > way and one of the things i did to fix my problem was using ruby. It might have > been because of the PID-file. If you dont like it try without which might work > or not ;). Tried and failed. Apparently start-stop-daemon does not like shebang scripts > > The config is used, try "-p 10000" or something like in the configfile. Sure. But the variable $CONFIG is not used. /etc/conf.d/gem_server will get read no matter $CONFIG is defined. I still want to get rid of CONFIG assignment in the script unless it's there on purpose. I have removed it for now. If you still see the variable needed, tell me. > > You are right it should depend on net. > > I dont mind add whatever you need. >