[Mono-devel-list] mod_mono start/stop script

Jaroslaw Kowalski jaak at zd.com.pl
Wed Feb 25 02:26:24 EST 2004


I use the following solution (working on Fedora Core 1).

1. I have a group "aspnet"

2. Apache user is a member of this group (this way it can access
/tmp/mod_mono_server without a problem)

3. My /etc/init.d/aspnet is attached. This should be run as root.

4. It makes use of two helper scripts "start_aspnet" and "stop_aspnet" which
run off the "aspnet" account. Both are attached.

5. Currently I have just one managed application, but when I have more, I'm
going to move the configuration to /etc/sysconfig/aspnet or sth.

It just works. The advantage is that you don't need to restart apache,
because the file permissions are just right and it works nice after reboot.

Feel free to use and extend this solution if you find it any useful.

Jarek

----- Original Message ----- 
From: "Met @ Uber" <met at uberstats.com>
To: "Mono-devel" <mono-devel-list at lists.ximian.com>
Sent: Wednesday, February 25, 2004 4:13 AM
Subject: [Mono-devel-list] mod_mono start/stop script


> I just started writing an init.d file to start/stop mod_mono_server.exe
> until I realized it wasn't going to be very easy.  Has anyone written
> something like this yet?  If not, here's what I was thinking.
>
> Starting the server isn't hard (turn on mod_mono, check file
> permissions, start/restart apache).  Restarting and stopping however, is
> a bit harder because mod_mono_server.exe is run under mono.  So I was
> thinking of using `pidof` and killing each process or building a semi
> smart `ps aux` grep'er to find the exact pid's to kill.
>
> How bad of an idea is this?  Suggestions?
>
> ~ Matthew
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aspnet
Type: application/octet-stream
Size: 482 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040225/854fa376/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stop_aspnet
Type: application/octet-stream
Size: 167 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040225/854fa376/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: start_aspnet
Type: application/octet-stream
Size: 277 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040225/854fa376/attachment-0002.obj 


More information about the Mono-devel-list mailing list