1 |
loki_val 08/11/23 20:12:16 |
2 |
|
3 |
Added: xsp.initd mod-mono-server.initd xsp.confd |
4 |
mod-mono-server.confd |
5 |
Log: |
6 |
Add necessary files, tidy up. |
7 |
(Portage version: 2.2_rc14/cvs/Linux 2.6.28-rc4 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-dotnet/xsp/files/2.0/xsp.initd |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/xsp.initd?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/xsp.initd?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: xsp.initd |
16 |
=================================================================== |
17 |
#!/sbin/runscript |
18 |
# Copyright 1999-2007 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
# $Id: xsp.initd,v 1.1 2008/11/23 20:12:16 loki_val Exp $ |
21 |
|
22 |
depend() { |
23 |
need net |
24 |
after dotnet |
25 |
} |
26 |
|
27 |
start() { |
28 |
ebegin "Starting xsp" |
29 |
|
30 |
if [ ${MonoServerVersion} -eq 1 ]; then |
31 |
xsppath=1.0/xsp.exe |
32 |
elif [ ${MonoServerVersion} -eq 2 ]; then |
33 |
xsppath=2.0/xsp2.exe |
34 |
else |
35 |
eerror "MonoServerVersion was not properly set. Check your config file" |
36 |
return 1 |
37 |
fi |
38 |
|
39 |
start-stop-daemon --quiet --start \ |
40 |
--background \ |
41 |
--make-pidfile \ |
42 |
--pidfile /var/run/aspnet/xsp.pid \ |
43 |
--chuid aspnet \ |
44 |
--exec /usr/bin/mono /usr/lib/mono/${xsppath} -- --root ${MonoServerRoot} --port ${MonoServerPort} --nonstop |
45 |
eend $? |
46 |
} |
47 |
|
48 |
stop() { |
49 |
ebegin "Stopping xsp" |
50 |
start-stop-daemon -o --quiet --stop \ |
51 |
--pidfile /var/run/aspnet/xsp.pid |
52 |
eend $? |
53 |
} |
54 |
|
55 |
|
56 |
|
57 |
|
58 |
1.1 dev-dotnet/xsp/files/2.0/mod-mono-server.initd |
59 |
|
60 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/mod-mono-server.initd?rev=1.1&view=markup |
61 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/mod-mono-server.initd?rev=1.1&content-type=text/plain |
62 |
|
63 |
Index: mod-mono-server.initd |
64 |
=================================================================== |
65 |
#!/sbin/runscript |
66 |
# Copyright 1999-2007 Gentoo Foundation |
67 |
# Distributed under the terms of the GNU General Public License v2 |
68 |
# $Id: mod-mono-server.initd,v 1.1 2008/11/23 20:12:16 loki_val Exp $ |
69 |
|
70 |
depend() { |
71 |
use net |
72 |
after dotnet |
73 |
} |
74 |
|
75 |
start() { |
76 |
[ -z "$MonoServerRootDir" ] && \ |
77 |
MonoServerRootDir="/usr/lib/xsp/test" |
78 |
[ -z "$MonoApplications" ] && \ |
79 |
MonoApplications="/mono:/usr/lib/xsp/test,/:." |
80 |
[ -z "$UnixSocketFileName" ] && \ |
81 |
UnixSocketFileName="/tmp/mod_mono_server" |
82 |
[ -z "$MonoServerAddress" ] && \ |
83 |
MonoServerAddress=127.0.0.1 |
84 |
[ -z "$MonoServerPort" ] && \ |
85 |
MonoServerPort=8080 |
86 |
[ -z "$MonoServerVersion" ] && \ |
87 |
MonoServerVersion=1 |
88 |
|
89 |
MONO_SERVER_OPTS="--root ${MonoServerRootDir} \ |
90 |
--applications ${MonoApplications} --nonstop" |
91 |
|
92 |
[ -n "$MonoApplicationsConfigDir" ] && \ |
93 |
MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ |
94 |
--appconfigdir ${MonoApplicationsConfigDir}" |
95 |
|
96 |
case "$MonoServerChannel" in |
97 |
"tcp" ) |
98 |
MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ |
99 |
--address ${MonoServerAddress} --port ${MonoServerPort}" |
100 |
;; |
101 |
|
102 |
"unix" ) |
103 |
[ -f "$UnixSocketFileName" ] && rm -f $UnixSocketFileName |
104 |
MONO_SERVER_OPTS="${MONO_SERVER_OPTS} \ |
105 |
--filename ${UnixSocketFileName}" |
106 |
;; |
107 |
|
108 |
* ) |
109 |
eerror "Please set a valid value for MonoServerChannel" |
110 |
return 1 |
111 |
;; |
112 |
esac |
113 |
|
114 |
if [ ${MonoServerVersion} -eq 1 ]; then |
115 |
modmonoserverpath=1.0/mod-mono-server.exe |
116 |
elif [ ${MonoServerVersion} -eq 2 ]; then |
117 |
modmonoserverpath=2.0/mod-mono-server2.exe |
118 |
else |
119 |
eerror "MonoServerVersion was not properly set. Check your /etc/conf.d/xsp" |
120 |
return 1 |
121 |
fi |
122 |
|
123 |
export MONO_SHARED_DIR=/tmp |
124 |
|
125 |
ebegin "Starting mod-mono-server" |
126 |
|
127 |
start-stop-daemon --quiet --start \ |
128 |
--background \ |
129 |
--make-pidfile \ |
130 |
--pidfile /var/run/aspnet/mod-mono-server.pid \ |
131 |
--chuid aspnet \ |
132 |
--exec /usr/bin/mono /usr/lib/mono/${modmonoserverpath} \ |
133 |
-- $MONO_SERVER_OPTS |
134 |
|
135 |
eend $? |
136 |
} |
137 |
|
138 |
stop() { |
139 |
ebegin "Stopping mod-mono-server" |
140 |
|
141 |
start-stop-daemon -o --quiet --stop \ |
142 |
--pidfile /var/run/aspnet/mod-mono-server.pid |
143 |
|
144 |
eend $? |
145 |
} |
146 |
|
147 |
|
148 |
|
149 |
1.1 dev-dotnet/xsp/files/2.0/xsp.confd |
150 |
|
151 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/xsp.confd?rev=1.1&view=markup |
152 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/xsp.confd?rev=1.1&content-type=text/plain |
153 |
|
154 |
Index: xsp.confd |
155 |
=================================================================== |
156 |
# Config file for /etc/init.d/xsp |
157 |
# $Id: xsp.confd,v 1.1 2008/11/23 20:12:16 loki_val Exp $ |
158 |
|
159 |
# This is the document root; trailing slash is not necessary |
160 |
MonoServerRoot=/usr/lib/xsp/test |
161 |
|
162 |
# Port for the server to run on |
163 |
MonoServerPort=8000 |
164 |
|
165 |
# If you want to host .NET 2.0 applications you have to set this to 2. |
166 |
# Otherwise, leave it unchanged |
167 |
MonoServerVersion=1 |
168 |
|
169 |
|
170 |
|
171 |
1.1 dev-dotnet/xsp/files/2.0/mod-mono-server.confd |
172 |
|
173 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/mod-mono-server.confd?rev=1.1&view=markup |
174 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-dotnet/xsp/files/2.0/mod-mono-server.confd?rev=1.1&content-type=text/plain |
175 |
|
176 |
Index: mod-mono-server.confd |
177 |
=================================================================== |
178 |
# Config file for /etc/init.d/mod-mono-server |
179 |
# $Id: mod-mono-server.confd,v 1.1 2008/11/23 20:12:16 loki_val Exp $ |
180 |
|
181 |
# Configuration directives for mod-mono-server.exe. For more information on |
182 |
# these variables, see the man page for xsp(1). |
183 |
|
184 |
# This is the document root; trailing slash is not necessary |
185 |
#MonoServerRootDir="/usr/lib/xsp/test" |
186 |
|
187 |
# Directory to search for files with an `.webapp' extension. |
188 |
#MonoApplicationsConfigDir="/usr/lib/xsp/test" |
189 |
|
190 |
# Comma separated list of directories (in the form virtual:real) for all |
191 |
# applications managed by the server. For example: |
192 |
# /app1:/var/www/localhost/htdocs/app1,/app2:/var/www/localhost/htdocs/app2 |
193 |
MonoApplications="/mono:/usr/lib/xsp/test" |
194 |
|
195 |
# The communication channel used between mod-mono-server and mod_mono. |
196 |
# unix - A unix socket |
197 |
# tcp - A TCP connection |
198 |
MonoServerChannel="unix" |
199 |
|
200 |
# When the comm. channel is "unix", the local filename used by the socket. |
201 |
UnixSocketFileName="/tmp/mod_mono_server" |
202 |
|
203 |
# When the comm. channel is "tcp", IP address for the server to listen on. |
204 |
#MonoServerAddress=127.0.0.1 |
205 |
|
206 |
# When the comm. channel is "tcp", port for the server to listen on. |
207 |
#MonoServerPort=8080 |
208 |
|
209 |
# If you want to host .NET 2.0 applications you have to set this to 2. |
210 |
# Otherwise, leave it unchaged |
211 |
MonoServerVersion=1 |