diff options
Diffstat (limited to 'dev-dotnet/xsp/files/1.2.6/xsp.initd')
-rw-r--r-- | dev-dotnet/xsp/files/1.2.6/xsp.initd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dev-dotnet/xsp/files/1.2.6/xsp.initd b/dev-dotnet/xsp/files/1.2.6/xsp.initd new file mode 100644 index 000000000000..a2a4d27e1cd1 --- /dev/null +++ b/dev-dotnet/xsp/files/1.2.6/xsp.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/xsp/files/1.2.6/xsp.initd,v 1.1 2007/12/14 20:10:31 jurek Exp $ + +depend() { + need net + after dotnet +} + +start() { + ebegin "Starting xsp" + + if [ ${MonoServerVersion} -eq 1 ]; then + xsppath=1.0/xsp.exe + elif [ ${MonoServerVersion} -eq 2 ]; then + xsppath=2.0/xsp2.exe + else + eerror "MonoServerVersion was not properly set. Check your config file" + return 1 + fi + + start-stop-daemon --quiet --start \ + --background \ + --make-pidfile \ + --pidfile /var/run/aspnet/xsp.pid \ + --chuid aspnet \ + --exec /usr/bin/mono /usr/lib/mono/${xsppath} -- --root ${MonoServerRoot} --port ${MonoServerPort} --nonstop + eend $? +} + +stop() { + ebegin "Stopping xsp" + start-stop-daemon -o --quiet --stop \ + --pidfile /var/run/aspnet/xsp.pid + eend $? +} + |