December 28th, 2012, 06:18 PM
Join Date: Aug 2012
Time spent in forums: 4 h 46 m 56 sec
Reputation Power: 0
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:
socket_type = stream
protocol = tcp
port = 26
wait = no
user = root
server = /usr/bin/ruby
server_args = -KU /usr/local/bin/xkcd
disable = no
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.
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.