[Pkg-mono-svn-commits] rev 774 - libapache-mod-mono/trunk/debian
Pablo Fischer
pabl0-guest@haydn.debian.org
Fri, 21 May 2004 12:34:14 -0600
Author: pabl0-guest
Date: 2004-05-21 12:33:38 -0600 (Fri, 21 May 2004)
New Revision: 774
Modified:
libapache-mod-mono/trunk/debian/control
libapache-mod-mono/trunk/debian/libapache-mod-mono.postinst
libapache-mod-mono/trunk/debian/libapache-mod-mono.prerm
libapache-mod-mono/trunk/debian/rules
Log:
Removed the old apache restart method, now we are going to use
wwwconfig scripts :-)
Modified: libapache-mod-mono/trunk/debian/control
===================================================================
--- libapache-mod-mono/trunk/debian/control 2004-05-21 18:32:05 UTC (rev 773)
+++ libapache-mod-mono/trunk/debian/control 2004-05-21 18:33:38 UTC (rev 774)
@@ -1,5 +1,5 @@
Source: libapache-mod-mono
-Section: unknown
+Section: web
Priority: optional
Maintainer: Pablo Fischer <pablo@pablo.com.mx>
Build-Depends: debhelper (>= 4.0.0), apache-dev, libmono-dev
@@ -7,6 +7,7 @@
Package: libapache-mod-mono
Architecture: any
-Depends: ${shlibs:Depends}, apache (>= 1.3.27-0.1), mono-jit, mono-server
+Section: web
+Depends: ${shlibs:Depends}, apache (>= 1.3.27-0.1), mono-jit (>= 0.31-2), mono-server (>= 0.12), wwwconfig-common
Description: Run ASP.NET Pages on UNIX with Apache and Mono
Run ASP.NET pages on Unix with Apache and Mono!
Modified: libapache-mod-mono/trunk/debian/libapache-mod-mono.postinst
===================================================================
--- libapache-mod-mono/trunk/debian/libapache-mod-mono.postinst 2004-05-21 18:32:05 UTC (rev 773)
+++ libapache-mod-mono/trunk/debian/libapache-mod-mono.postinst 2004-05-21 18:33:38 UTC (rev 774)
@@ -9,7 +9,7 @@
apachecfg="/etc/apache"
modmono_conf="$apachecfg/conf.d/mono.conf"
tempfile=`/bin/tempfile`
-virtual_dirs=`mono-server-reader.conf`
+restart=""
activate_module() {
for i in apache apache-ssl; do
@@ -33,56 +33,25 @@
}
+add_monoserver_conf() {
+ webservers="apache-ssl apache"
-restart_apache() {
- #Apache is already running?
- if [ -f /var/run/mono-server ]; then
- # Are we really running apache?
- apache_pid=`cat /var/run/apache.pid`
- apache_ps=`ps -p $apache_pid | wc -l`
- # Are there any process running by that pid?
- if [ "$apache_ps" != "1" ]; then
- /etc/init.d/apache restart
- fi
- fi
-
+ #wwwconfig way!, I love it!
+ for server in $webservers; do
+ includefile=/etc/apache/conf.d/demonmail.conf
+ conffile=/etc/apache/httpd.conf
+ . /usr/share/wwwconfig-common/apache-include.sh
+ [ "$status" = "uncomment" -o "$status" = "include" ] && restart="$server $restart"
+ done
}
-shouldrestart_monoserver() {
- if [ -e "/etc/default/mono-server" ]; then
- . "/etc/default/mono-server"
- if [ "$start_boot" != "true" ]; then
- return 1
- fi
- fi
-
- if [ ! -f /usr/lib/apache/1.3/500mod_mono.info ]; then
- return 1
- fi
-
- if [ ! -e "/etc/mono-server/mono-server-hosts.conf" ]; then
- return 1
- fi
-
- if [[ $virtual_dirs = *Sorry* ]]; then
- return 1
- fi
-
- if [[ -z $virtual_dirs ]]; then
- return 1
- fi
- return 0
+restart_apache() {
+ servers="apache-ssl apache"
+ . /usr/share/wwwconfig-common/restart.sh
}
-restart_monoserver() {
- if shouldrestart_monoserver ; then
- echo -n "Starting Mono Server, mono-server: mono-server"
- /etc/init.d/mono-server start > /dev/null 2>&1 || true
- fi
-}
-
case "$1" in
configure)
db_get libapache-mod-mono/activate
@@ -94,8 +63,8 @@
disable_module
fi
+ add_monoserver_conf
restart_apache
- restart_monoserver
rm -Rf $tempfile
Modified: libapache-mod-mono/trunk/debian/libapache-mod-mono.prerm
===================================================================
--- libapache-mod-mono/trunk/debian/libapache-mod-mono.prerm 2004-05-21 18:32:05 UTC (rev 773)
+++ libapache-mod-mono/trunk/debian/libapache-mod-mono.prerm 2004-05-21 18:33:38 UTC (rev 774)
@@ -1,6 +1,7 @@
#!/bin/sh -e
apachecfg="/etc/apache"
+restart=""
turnoff_module() {
for i in apache apache-ssl; do
@@ -14,46 +15,34 @@
}
-restart_apache() {
- #Apache is already running?
- if [ -f /var/run/mono-server ]; then
- # Are we really running apache?
- apache_pid=`cat /var/run/apache.pid`
- apache_ps=`ps -p $apache_pid | wc -l`
- # Are there any process running by that pid?
- if [ "$apache_ps" != "1" ]; then
- /etc/init.d/apache restart
- fi
- fi
-}
+remove_monoserver_conf() {
+ webservers="apache-ssl apache"
-shouldstop_monoserver() {
- if [ -f "/var/run/mono-server" ]; then
- # Are we really running monoserver?
- monoserver_pid=`cat /var/run/mono-server`
- monoserver_ps=`ps -p $monoserver_pid | wc -l`
- # Are there any process running by that pid?
- if [ "$monoserver_ps" = "2" ]; then
- return 0
- else
- return 1
- fi
- fi
- return 0
+ #wwwconfig way!, I love it!
+ for server in $webservers; do
+ includefile=/etc/apache/conf.d/demonmail.conf
+ conffile=/etc/apache/httpd.conf
+ . /usr/share/wwwconfig-common/apache-uninclude.sh
+ [ "$status" = "uncomment" -o "$status" = "include" ] && restart="$server $restart"
+ done
}
-restart_monoserver() {
- if shouldstop_monoserver ; then
- echo "Stopping Mono Server, mono-server: mono-server "
- /etc/init.d/mono-server stop > /dev/null 2>&1 || true
- fi
+restart_apache() {
+ webservers="apache-ssl apache"
+
+ #wwwconfig way!, I love it!
+ for server in $webservers; do
+ restart="$server $restart"
+ done
+ servers="apache-ssl apache"
+ . /usr/share/wwwconfig-common/restart.sh
}
case "$1" in
remove)
turnoff_module
+ remove_monoserver_conf
restart_apache
- restart_monoserver
;;
upgrade | deconfigure | failed-upgrade)
:
Modified: libapache-mod-mono/trunk/debian/rules
===================================================================
--- libapache-mod-mono/trunk/debian/rules 2004-05-21 18:32:05 UTC (rev 773)
+++ libapache-mod-mono/trunk/debian/rules 2004-05-21 18:33:38 UTC (rev 774)
@@ -67,11 +67,14 @@
dh_installdirs
# Add here commands to install the package into debian/libapache-mod-mono.
- $(MAKE) install DESTDIR=$(CURDIR)/debian/libapache-mod-mono
+ #We need APXS = /bin/true, a stupid trick or mod_mono will install everything in /usr
+ # not in $(CURDIR)/debian/libapache-mod-mono
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/libapache-mod-mono APXS=/bin/true
mkdir -p $(APACHEETC)
- cp -f $(CURDIR)/debian/500mod_mono.info $(APACHELIB)/500mod_mono.info
- cp -f $(CURDIR)/debian/mono.conf $(APACHEETC)/mono.conf
+ install -m644 $(CURDIR)/debian/500mod_mono.info $(APACHELIB)/500mod_mono.info
+# install -m644 $(CURDIR)/debian/mono.conf $(APACHEETC)/mono.conf
+ install -m755 $(CURDIR)/src/.libs/libmod_mono.so $(APACHELIB)/mod_mono.so
# Build architecture-independent files here.
binary-indep: build install