December 28th, 2012, 06:18 PM
Using a Ruby script as an xinetd server
Hey, sorry if this is the wrong place to ask. I'm looking to set up a simple telnet server using a Ruby script as the server - it's for viewing transcripts of xkcd comics through a terminal. This is the service file:
The service starts, and I can connect to it using telnet localhost 26. However, my program doesn't run. I can type things and my keyboard echoes the keystrokes back at me but that's it.
socket_type = stream
protocol = tcp
port = 26
wait = no
user = root
server = /usr/bin/ruby
server_args = -KU /usr/local/bin/xkcd
disable = no
Using a binary file works perfectly, such as a simple C program to print Hello world or something. But using any kind of script doesn't.
Thanks for any help you could give me.