[Pkg-mono-svn-commits] rev 545 - monodoc/trunk/debian
Pablo Fischer
pabl0-guest@haydn.debian.org
Sat, 10 Apr 2004 14:56:04 -0600
Author: pabl0-guest
Date: 2004-04-10 14:56:02 -0600 (Sat, 10 Apr 2004)
New Revision: 545
Modified:
monodoc/trunk/debian/monodoc-http.postinst
monodoc/trunk/debian/monodoc-http.postrm
Log:
Some fixes and more easy to maintain.
Modified: monodoc/trunk/debian/monodoc-http.postinst
===================================================================
--- monodoc/trunk/debian/monodoc-http.postinst 2004-04-10 20:21:34 UTC (rev 544)
+++ monodoc/trunk/debian/monodoc-http.postinst 2004-04-10 20:56:02 UTC (rev 545)
@@ -1,30 +1,42 @@
#!/bin/sh -e
+package="monodoc"
+
+make_config_host() {
+ echo "# This is the configuration file"
+ echo "# for the $package virtualhost"
+ echo "path = /usr/share/dotnet/monodoc/web"
+ echo "alias = /monodoc"
+}
+
update() {
daemon="$1"
- cfg="$2"
+ cfg_dir="$2"
which mono-$daemon-update.conf || return 0
- if [ -d "/etc/$cfg" ]; then
- mono-$daemon-update.conf || true
+ if [ -d "/etc/$cfg_dir" ]; then
+ #Create the config host dir
+ mkdir -p "/etc/$cfg_dir/conf.d/$package"
+ #Add the file
+ make_config_host > "/etc/$cfg_dir/conf.d/$package/10_$package"
+ #Update..
+ mono-$daemon-update.conf || true
fi
- # this is crap. Should be moved to the update programs, so they
- # restart the daemon when and only when the config has changed
- oldpid="`cat /var/run/mono-$daemon 2>/dev/null`"
- if [ "$oldpid" ] && [ "`ps h -p $oldpid`" ]; then
- /etc/init.d/mono-$daemon restart > /dev/null 2>&1 || true
- fi
}
+
case "$1" in
- configure)
+ configure)
+ update xsp xsp
+ update server mono-server
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ #Do nothing..
+ ;;
- update xsp xsp
- update server mono-server
- ;;
-
+ *)
+ ;;
esac
#DEBHELPER#
-
exit 0
-
Modified: monodoc/trunk/debian/monodoc-http.postrm
===================================================================
--- monodoc/trunk/debian/monodoc-http.postrm 2004-04-10 20:21:34 UTC (rev 544)
+++ monodoc/trunk/debian/monodoc-http.postrm 2004-04-10 20:56:02 UTC (rev 545)
@@ -1,30 +1,33 @@
#!/bin/sh -e
+package="monodoc"
+
update() {
daemon="$1"
- cfg="$2"
+ cfg_dir="$2"
which mono-$daemon-update.conf || return 0
- if [ -d "/etc/$cfg" ]; then
- mono-$daemon-update.conf || true
+ if [ -d "/etc/$cfg_dir" ]; then
+ #Remove the config host dir
+ rm -Rf "/etc/$cfg_dir/conf.d/$package"
+ #Update..
+ mono-$daemon-update.conf || true
fi
- # this is crap. Should be moved to the update programs, so they
- # restart the daemon when and only when the config has changed
- oldpid="`cat /var/run/mono-$daemon 2>/dev/null`"
- if [ "$oldpid" ] && [ "`ps h -p $oldpid`" ]; then
- /etc/init.d/mono-$daemon restart > /dev/null 2>&1 || true
- fi
}
+
case "$1" in
- purge|remove)
+ purge|remove)
+ update xsp xsp
+ update server mono-server
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ #Do nothing..
+ ;;
- update xsp xsp
- update server mono-server
- ;;
-
+ *)
+ ;;
esac
#DEBHELPER#
-
exit 0
-