summaryrefslogtreecommitdiff
path: root/www-servers/xsp/files
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/xsp/files')
-rw-r--r--www-servers/xsp/files/2.2/mod-mono-server-r1.initd82
-rw-r--r--www-servers/xsp/files/2.2/mod-mono-server.confd33
-rw-r--r--www-servers/xsp/files/2.2/mod-mono-server.initd80
-rw-r--r--www-servers/xsp/files/2.2/xsp.confd11
-rw-r--r--www-servers/xsp/files/2.2/xsp.initd37
-rw-r--r--www-servers/xsp/files/aclocal-fix.patch13
-rw-r--r--www-servers/xsp/files/systemd/mono-xsp4.service15
-rw-r--r--www-servers/xsp/files/systemd/mono.webapp10
8 files changed, 281 insertions, 0 deletions
diff --git a/www-servers/xsp/files/2.2/mod-mono-server-r1.initd b/www-servers/xsp/files/2.2/mod-mono-server-r1.initd
new file mode 100644
index 000000000000..22d7ba9af428
--- /dev/null
+++ b/www-servers/xsp/files/2.2/mod-mono-server-r1.initd
@@ -0,0 +1,82 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ after dotnet
+}
+
+start() {
+ [ -z "$MonoServerRootDir" ] && \
+ MonoServerRootDir="/usr/lib/xsp/test"
+ [ -z "$MonoApplications" ] && \
+ MonoApplications="/mono:/usr/lib/xsp/test,/:."
+ [ -z "$UnixSocketFileName" ] && \
+ UnixSocketFileName="/tmp/mod_mono_server"
+ [ -z "$MonoServerAddress" ] && \
+ MonoServerAddress=127.0.0.1
+ [ -z "$MonoServerPort" ] && \
+ MonoServerPort=8080
+ [ -z "$MonoServerVersion" ] && \
+ MonoServerVersion=1
+
+ MONO_SERVER_OPTS="--root ${MonoServerRootDir} \
+--applications ${MonoApplications} --nonstop"
+
+ [ -n "$MonoApplicationsConfigDir" ] && \
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--appconfigdir ${MonoApplicationsConfigDir}"
+
+ case "$MonoServerChannel" in
+ "tcp" )
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--address ${MonoServerAddress} --port ${MonoServerPort}"
+ ;;
+
+ "unix" )
+ [ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--filename ${UnixSocketFileName}"
+ ;;
+
+ * )
+ eerror "Please set a valid value for MonoServerChannel"
+ return 1
+ ;;
+ esac
+
+ if [ ${MonoServerVersion} -eq 1 ]; then
+ modmonoserverpath=1.0/mod-mono-server.exe
+ elif [ ${MonoServerVersion} -eq 2 ]; then
+ modmonoserverpath=2.0/mod-mono-server2.exe
+ elif [ ${MonoServerVersion} -eq 4 ]; then
+ modmonoserverpath=4.0/mod-mono-server4.exe
+ else
+ eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/mod-mono-server"
+ return 1
+ fi
+
+ export MONO_SHARED_DIR=/tmp
+
+ ebegin "Starting mod-mono-server"
+
+ start-stop-daemon --quiet --start \
+ --background \
+ --make-pidfile \
+ --pidfile /var/run/aspnet/mod-mono-server.pid \
+ --user aspnet \
+ --exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \
+ -- $MONO_SERVER_OPTS
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mod-mono-server"
+
+ start-stop-daemon --quiet --stop \
+ --pidfile /var/run/aspnet/mod-mono-server.pid
+
+ eend $?
+}
diff --git a/www-servers/xsp/files/2.2/mod-mono-server.confd b/www-servers/xsp/files/2.2/mod-mono-server.confd
new file mode 100644
index 000000000000..6c6836b9561b
--- /dev/null
+++ b/www-servers/xsp/files/2.2/mod-mono-server.confd
@@ -0,0 +1,33 @@
+# Config file for /etc/init.d/mod-mono-server
+
+# Configuration directives for mod-mono-server.exe. For more information on
+# these variables, see the man page for xsp(1).
+
+# This is the document root; trailing slash is not necessary
+#MonoServerRootDir="/usr/lib/xsp/test"
+
+# Directory to search for files with an `.webapp' extension.
+#MonoApplicationsConfigDir="/usr/lib/xsp/test"
+
+# Comma separated list of directories (in the form virtual:real) for all
+# applications managed by the server. For example:
+# /app1:/var/www/localhost/htdocs/app1,/app2:/var/www/localhost/htdocs/app2
+MonoApplications="/mono:/usr/lib/xsp/test"
+
+# The communication channel used between mod-mono-server and mod_mono.
+# unix - A unix socket
+# tcp - A TCP connection
+MonoServerChannel="unix"
+
+# When the comm. channel is "unix", the local filename used by the socket.
+UnixSocketFileName="/tmp/mod_mono_server"
+
+# When the comm. channel is "tcp", IP address for the server to listen on.
+#MonoServerAddress=127.0.0.1
+
+# When the comm. channel is "tcp", port for the server to listen on.
+#MonoServerPort=8080
+
+# If you want to host .NET 2.0 applications you have to set this to 2.
+# Otherwise, leave it unchaged
+MonoServerVersion=1
diff --git a/www-servers/xsp/files/2.2/mod-mono-server.initd b/www-servers/xsp/files/2.2/mod-mono-server.initd
new file mode 100644
index 000000000000..fb1c44935e09
--- /dev/null
+++ b/www-servers/xsp/files/2.2/mod-mono-server.initd
@@ -0,0 +1,80 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ after dotnet
+}
+
+start() {
+ [ -z "$MonoServerRootDir" ] && \
+ MonoServerRootDir="/usr/lib/xsp/test"
+ [ -z "$MonoApplications" ] && \
+ MonoApplications="/mono:/usr/lib/xsp/test,/:."
+ [ -z "$UnixSocketFileName" ] && \
+ UnixSocketFileName="/tmp/mod_mono_server"
+ [ -z "$MonoServerAddress" ] && \
+ MonoServerAddress=127.0.0.1
+ [ -z "$MonoServerPort" ] && \
+ MonoServerPort=8080
+ [ -z "$MonoServerVersion" ] && \
+ MonoServerVersion=1
+
+ MONO_SERVER_OPTS="--root ${MonoServerRootDir} \
+--applications ${MonoApplications} --nonstop"
+
+ [ -n "$MonoApplicationsConfigDir" ] && \
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--appconfigdir ${MonoApplicationsConfigDir}"
+
+ case "$MonoServerChannel" in
+ "tcp" )
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--address ${MonoServerAddress} --port ${MonoServerPort}"
+ ;;
+
+ "unix" )
+ [ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName
+ MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \
+--filename ${UnixSocketFileName}"
+ ;;
+
+ * )
+ eerror "Please set a valid value for MonoServerChannel"
+ return 1
+ ;;
+ esac
+
+ if [ ${MonoServerVersion} -eq 1 ]; then
+ modmonoserverpath=1.0/mod-mono-server.exe
+ elif [ ${MonoServerVersion} -eq 2 ]; then
+ modmonoserverpath=2.0/mod-mono-server2.exe
+ else
+ eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/xsp"
+ return 1
+ fi
+
+ export MONO_SHARED_DIR=/tmp
+
+ ebegin "Starting mod-mono-server"
+
+ start-stop-daemon --quiet --start \
+ --background \
+ --make-pidfile \
+ --pidfile /var/run/aspnet/mod-mono-server.pid \
+ --chuid aspnet \
+ --exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \
+ -- $MONO_SERVER_OPTS
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping mod-mono-server"
+
+ start-stop-daemon -o --quiet --stop \
+ --pidfile /var/run/aspnet/mod-mono-server.pid
+
+ eend $?
+}
diff --git a/www-servers/xsp/files/2.2/xsp.confd b/www-servers/xsp/files/2.2/xsp.confd
new file mode 100644
index 000000000000..e4f79aafa5e5
--- /dev/null
+++ b/www-servers/xsp/files/2.2/xsp.confd
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/xsp
+
+# This is the document root; trailing slash is not necessary
+MonoServerRoot=/usr/lib/xsp/test
+
+# Port for the server to run on
+MonoServerPort=8000
+
+# If you want to host .NET 2.0 applications you have to set this to 2.
+# Otherwise, leave it unchanged
+MonoServerVersion=1
diff --git a/www-servers/xsp/files/2.2/xsp.initd b/www-servers/xsp/files/2.2/xsp.initd
new file mode 100644
index 000000000000..6ac7bbf87c0b
--- /dev/null
+++ b/www-servers/xsp/files/2.2/xsp.initd
@@ -0,0 +1,37 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 $?
+}
+
diff --git a/www-servers/xsp/files/aclocal-fix.patch b/www-servers/xsp/files/aclocal-fix.patch
new file mode 100644
index 000000000000..49a00050fe8d
--- /dev/null
+++ b/www-servers/xsp/files/aclocal-fix.patch
@@ -0,0 +1,13 @@
+--- Makefile_old.am 2013-07-30 09:11:50.033962122 +0400
++++ Makefile.am 2013-07-30 09:12:20.843574793 +0400
+@@ -1,10 +1,2 @@
+ SUBDIRS=build man src test tools scripts packaging lib
+ ACLOCAL_AMFLAGS += -I build/m4
+-
+-if UNITTESTS
+-SUBDIRS += unittests
+-endif
+-
+-if BUILD_DOCS
+-SUBDIRS += docs
+-endif
diff --git a/www-servers/xsp/files/systemd/mono-xsp4.service b/www-servers/xsp/files/systemd/mono-xsp4.service
new file mode 100644
index 000000000000..3e5f60291953
--- /dev/null
+++ b/www-servers/xsp/files/systemd/mono-xsp4.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=XSP 4.0 WebServer
+Wants=network.target
+ConditionFileNotEmpty=/etc/xsp4/mono.webapp
+ConditionDirectoryNotEmpty=/etc/xsp4/conf.d
+
+[Service]
+Type=simple
+User=aspnet
+Group=aspnet
+ExecStart=/usr/bin/xsp4 --port 8084 --address 0.0.0.0 --appconfigdir /etc/xsp4 --nonstop
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-servers/xsp/files/systemd/mono.webapp b/www-servers/xsp/files/systemd/mono.webapp
new file mode 100644
index 000000000000..3f611b1e2374
--- /dev/null
+++ b/www-servers/xsp/files/systemd/mono.webapp
@@ -0,0 +1,10 @@
+<web-application>
+ <name>Root</name>
+ <vpath>/</vpath>
+ <path>/usr/lib64/xsp/test</path>
+ <!-- vhost and port are ignored in xsp.exe -->
+ <vhost>my.host.name</vhost>
+ <vport>8084</vport>
+ <!-- <enabled> is true by default -->
+ <!-- <enabled>false</enabled> -->
+</web-application>