Linux – How to install Mono XSP as a daemon on Debian

daemondebianlinuxmono

I want XSP to run on my virtual Debian 5 as a daemon.

How can I do that?

I tried next:

$ sudo cp /etc/init.d/skeleton /etc/init.d/xsp

updated the script properly:

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Mono XSP4"
NAME=xsp4
DAEMON=/usr/bin/$NAME
DAEMON_ARGS="--port 80 --nonstop --root /home/godfather/Projects/Test"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

then:

$ sudo update-rc.d xsp defaults

But after system restart it becomes stuck on next:

xsp
Listening on address: 0.0.0.0
Root directory: /home/godfather/Projects/Test
Listening on port: 80 (non-secure)

That's all.

It has the same output if run it in user mode and without --nonstop:

xsp
Listening on address: 0.0.0.0
Root directory: /home/godfather/Projects/Test
Listening on port: 80 (non-secure)
Hit Return to stop the server.

Is it XSP bug?

Best Answer

XSP isn't supposed to be used in production, it's a development server.

For production, take a look at mod_mono: http://www.mono-project.com/Mod_mono