[Pkg-mono-svn-commits] rev 352 - xsp-snapshot/trunk/debian/official
Pablo Fischer
pabl0-guest@quantz.debian.org
Thu, 26 Feb 2004 00:30:59 +0100
Author: pabl0-guest
Date: 2004-02-26 00:30:59 +0100 (Thu, 26 Feb 2004)
New Revision: 352
Modified:
xsp-snapshot/trunk/debian/official/mono-server.init
xsp-snapshot/trunk/debian/official/mono-xsp.init
Log:
* mono-xsp.init and mono-server.init:
+ Removed the old system of VirtualHost, we were using sh commands, now, we are going to use
nethostmanager to manage the VirtualHosts (paths and alias), as I said, nethostmanager will be
usable until Gonzalo release an app to manage the hosts in the web.config file.
+ Added a new rule to check if we should start the daemon, the new rule check if there is a
nethostmanager command and if one is one, count the total of hosts that it can print.
* mono-server.init
+ Removed the reload statement of the switch case
Modified: xsp-snapshot/trunk/debian/official/mono-server.init
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.init 2004-02-25 23:13:30 UTC (rev 351)
+++ xsp-snapshot/trunk/debian/official/mono-server.init 2004-02-25 23:30:59 UTC (rev 352)
@@ -51,6 +51,18 @@
exit 0
fi
+
+ if [ ! -x /usr/bin/nethostmanager ]; then
+ echo "Sorry, you don't have any hosts. I suggest you to download asp.net-examples"
+ exit 0
+ else
+ howmany=`nethostmanager print --config-file=$VIRTUALFILE | wc -l`
+ if [ $howmany = "0" ]; then
+ echo "Sorry, you don't have any hosts. I suggest you to download asp.net-examples"
+ exit 0
+ fi
+ fi
+
prepare_socket
}
@@ -60,7 +72,7 @@
case "$1" in
start)
should_start
- virtual_dirs=`echo $(cat $VIRTUALFILE | grep -v '#' | tr '\n' , | sed 's/.$//')`
+ virtual_dirs=`nethostmanager print --config-file=$VIRTUALFILE`
. $DEFAULT
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --background --make-pidfile \
@@ -75,19 +87,6 @@
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
echo "."
;;
- #reload)
- #
- # If the daemon can reload its config files on the fly
- # for example by sending it SIGHUP, do it here.
- #
- # If the daemon responds to changes in its config file
- # directly anyway, make this a do-nothing entry.
- #
- # echo -n "Reloading $DESC configuration..."
- # start-stop-daemon --stop --signal 1 --quiet --pidfile \
- # /var/run/$NAME.pid --exec $DAEMON
- # echo "done."
- #;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
@@ -100,7 +99,7 @@
should_start
- virtual_dirs=`echo $(cat $VIRTUALFILE | grep -v '#' | tr '\n' , | sed 's/.$//')`
+ virtual_dirs=`nethostmanager print --config-file=$VIRTUALFILE`
. $DEFAULT
start-stop-daemon --start --background --make-pidfile \
--quiet --pidfile /var/run/$NAME.pid \
Modified: xsp-snapshot/trunk/debian/official/mono-xsp.init
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.init 2004-02-25 23:13:30 UTC (rev 351)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.init 2004-02-25 23:30:59 UTC (rev 352)
@@ -25,6 +25,7 @@
exit 0
fi
fi
+
if [ ! -x $DAEMON ]; then
echo "$NAME is not executable, not starting"
exit 0
@@ -35,13 +36,25 @@
echo "To have it, you need to install at least one package for xsp (like asp.net-examples)"
exit 0
fi
+
+ if [ ! -x /usr/bin/nethostmanager ]; then
+ echo "Sorry, you don't have any hosts. I suggest you to download asp.net-examples"
+ exit 0
+ else
+ howmany=`nethostmanager print --config-file=$VIRTUALFILE | wc -l`
+ if [ $howmany = "0" ]; then
+ echo "Sorry, you don't have any hosts. I suggest you to download asp.net-examples"
+ exit 0
+ fi
+ fi
+
}
case "$1" in
start)
should_start
- virtual_dirs=`echo $(cat $VIRTUALFILE | grep -v '#' | tr '\n' , | sed 's/.$//')`
+ virtual_dirs=`nethostmanager print --config-file=$VIRTUALFILE`
. $DEFAULT
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --background --make-pidfile \
@@ -66,7 +79,7 @@
sleep 1
should_start
- virtual_dirs=`echo $(cat $VIRTUALFILE | grep -v '#' | tr '\n' , | sed 's/.$//')`
+ virtual_dirs=`nethostmanager print --config-file=$VIRTUALFILE`
. $DEFAULT
echo "Starting $DESC: $NAME"
start-stop-daemon --start --background --make-pidfile \