head	1.8;
access;
symbols
	HORDE_1_2_7:1.1.2.14
	HORDE_1_2_6:1.1.2.14
	HORDE_1_2_5:1.1.2.14
	HORDE_1_2_4:1.1.2.10
	HORDE_1_2_3:1.1.2.10
	HORDE_1_2_2:1.1.2.10
	HORDE_1_2_1:1.1.2.10
	HORDE_1_2_0:1.1.2.10
	HORDE_1_2_0_pre14:1.1.2.10
	HORDE_1_2_0_pre13:1.1.2.10
	HORDE_1_2_0_pre11:1.1.2.9
	HORDE_1_3_2:1.6
	HORDE_1_2_0_pre10:1.1.2.9
	HORDE_1_3_1:1.6
	HORDE_1_2_0_pre9:1.1.2.9
	HORDE_1_2_0_pre8:1.1.2.9
	HORDE_1_2_0_pre6:1.1.2.9
	horde-dev-20000104:1.6
	HORDE_1_2_0_pre5:1.1.2.4
	HORDE_1_2_0_pre4:1.1.2.1
	HORDE_1_2_0_pre3:1.1.2.1
	STABLE_1_2:1.1.0.2;
locks; strict;
comment	@# @;


1.8
date	2000.05.22.11.13.12;	author rkrusty;	state dead;
branches;
next	1.7;

1.7
date	2000.02.15.07.48.37;	author rkrusty;	state Exp;
branches;
next	1.6;

1.6
date	99.10.26.11.16.24;	author rkrusty;	state Exp;
branches;
next	1.5;

1.5
date	99.10.15.01.52.50;	author rkrusty;	state Exp;
branches;
next	1.4;

1.4
date	99.08.24.01.01.52;	author rkrusty;	state Exp;
branches;
next	1.3;

1.3
date	99.08.19.17.21.25;	author rkrusty;	state Exp;
branches;
next	1.2;

1.2
date	99.08.19.17.21.23;	author rkrusty;	state Exp;
branches;
next	1.1;

1.1
date	99.08.09.13.24.58;	author rkrusty;	state Exp;
branches
	1.1.2.1;
next	;

1.1.2.1
date	99.08.11.06.20.58;	author rkrusty;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	99.10.10.16.52.07;	author rkrusty;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	99.10.14.04.27.54;	author rkrusty;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	99.10.20.17.06.10;	author rkrusty;	state Exp;
branches;
next	1.1.2.5;

1.1.2.5
date	99.10.27.04.17.27;	author rkrusty;	state Exp;
branches;
next	1.1.2.6;

1.1.2.6
date	99.11.01.06.18.51;	author rkrusty;	state Exp;
branches;
next	1.1.2.7;

1.1.2.7
date	99.11.02.07.58.07;	author rkrusty;	state Exp;
branches;
next	1.1.2.8;

1.1.2.8
date	99.12.05.06.44.45;	author rkrusty;	state Exp;
branches;
next	1.1.2.9;

1.1.2.9
date	99.12.06.00.36.33;	author rkrusty;	state Exp;
branches;
next	1.1.2.10;

1.1.2.10
date	2000.05.18.20.23.25;	author rkrusty;	state Exp;
branches;
next	1.1.2.11;

1.1.2.11
date	2001.02.06.19.58.37;	author opal;	state Exp;
branches;
next	1.1.2.12;

1.1.2.12
date	2001.02.07.09.23.51;	author opal;	state Exp;
branches;
next	1.1.2.13;

1.1.2.13
date	2001.02.26.20.12.59;	author opal;	state Exp;
branches;
next	1.1.2.14;

1.1.2.14
date	2001.03.27.09.29.03;	author opal;	state Exp;
branches;
next	;


desc
@@


1.8
log
@[IEM] cleaning out the debian dir to prepare for the new stuff...nice clean
start. :)
@
text
@#!/bin/sh -e

# Source debconf library
. /usr/share/debconf/confmodule

case "$1" in
remove)
        db_input "critical" "horde/remove"  || true
        db_go
        ;;
purge)
        rm -rf /etc/horde /usr/share/horde /usr/share/doc/horde
        ;;
esac

#DEBHELPER#

exit 0
@


1.7
log
@[IEM] first round cleanup of debian package for -dev tree.  Bringing 1.2 stable
branch updates into 1.3-dev tree.
@
text
@@


1.6
log
@[IEM] migrating in changes from 2.2 tree
@
text
@d4 1
a4 1
. /usr/share/debconf/confmodule.sh
a6 4
purge)
        rm -rf /etc/horde
	rm -rf /usr/share/horde
        ;;
d8 1
a8 1
        db_input "critical" "horde/remove"     
d11 3
a17 1
db_stop
@


1.5
log
@[IEM] updating the -dev tree's debian stuff...(debconf, etc...)
@
text
@d12 3
a14 1
	;;
d19 1
@


1.4
log
@[IEM] updating deb stuff for -dev so I can start playing
@
text
@d1 1
a1 1
#!/bin/sh
d3 2
a4 1
set -e
d11 3
d15 1
a15 1
esac
d17 1
@


1.3
log
@[IEM] wow...I forgot to commt my deb stuff too... :)

    1>  Updated italian locales (sync'ng up from -pre)
    2>  Updates to the debian stuff so that it can pseudo like co-exist
        with current horde install.
@
text
@d7 2
a8 2
        rm -rf /etc/horde-devel
	rm -rf /usr/share/horde-devel
@


1.2
log
@[IEM] wow...I forgot to commt my deb stuff too... :)

    1>  Updated italian locales (sync'ng up from -pre)
    2>  Updates to the debian stuff so that it can pseudo like co-exist
        with current horde install.
@
text
@@


1.1
log
@[IEM] forgot these
@
text
@d7 2
a8 2
        rm -rf /etc/horde
	rm -rf /usr/share/horde
@


1.1.2.1
log
@[IEM] adding in versioning file and post remove script
@
text
@@


1.1.2.2
log
@[IEM] Preliminary changes for new configuration routines.  Trying to clean
up build process using new debconf option.  Getting rid of extra configuration
files for both postgres and mysql and will instead use a selection bit to
figure out what type of container the user will use and setup phplib and
horde related files on the fly based on choices.  (and upgrades after that
will use existing choices)  This sweep adds to files required by debconf
and specific to debconf working with horde.  horde.php3 and defaults.php3
will be build on the fly.  (really need to get rid of root_url and graphics_url
for the horde module and use the ones supplied in horde.php3 to cut down
on redundancy...adding to my todo)
@
text
@d1 1
a1 1
#!/bin/sh -e
d3 1
a3 2
# Source debconf library
. /usr/share/debconf/confmodule.sh
a12 3
#DEBHELPER#

exit 0
@


1.1.2.3
log
@[IEM] final touches to the debconf changes.  Now horde is tied into
debocnf so that one will have a one time config option (ala debconf)...now
to finish up the none install configure script that will interact with
debconf...

(2 weeks +/- away from Debian 2.2 freeze)
@
text
@d11 1
a11 2
remove)
	;;
@


1.1.2.4
log
@[IEM] committing fixed debian build pieces to bring it up for a pre5 release
@
text
@a11 10
        echo ""
        echo "!!!NOTE!!!"
        echo ""
	echo "You must manually remove the entries in /etc/apache/access.conf"
	echo "for HORDE.  This will eventually be done by this program."
        echo ""
        echo "Apache will break if you don't do this"
        echo ""
        echo "[PRESS RETURN] "
        read foo
@


1.1.2.5
log
@[IEM] committing final changes which fix all known issues with the debian
package (potato based)...should be happy for the freeze
@
text
@d12 11
a22 3
        db_input "critical" "horde/remove"     
        db_go
        ;;
a26 1
db_stop
@


1.1.2.6
log
@[IEM] upgrading debconf pieces to use newer debconf routines.
@
text
@d4 1
a4 2
. /usr/share/debconf/confmodule   
db_version 2.0
@


1.1.2.7
log
@[IEM] fixing broken debconf pre-configure pieces
@
text
@d4 2
a5 1
. /usr/share/debconf/confmodule
a7 4
remove)
        db_input "critical" "horde/remove"  || true
        db_go
        ;;
d12 4
d20 1
@


1.1.2.8
log
@[IEM] more debconf cleanup. Adding a update-horde script to rebuild config
files after modifying the templates.
@
text
@a13 1
	rm -rf /usr/share/doc/horde
@


1.1.2.9
log
@[IEM] setting an option to not recheck non-horde config files during each
upgrade.
@
text
@d12 3
a14 1
        rm -rf /etc/horde /usr/share/horde /usr/share/doc/horde
@


1.1.2.10
log
@[IEM] adding in a fix for exim support.  the web user needs to be in the
trusted user list in order to modify the sending users header.
@
text
@a9 8
        if [ -e /etc/exim.conf ]; then
          echo "Modifying /etc/exim.conf to remove IMP settings";
          /bin/sed -e 's#trusted_users = www-data:#trusted_users = #' /etc/exim.conf > /etc/exim.conf.tmp
          cp /etc/exim.conf /etc/exim.conf.bak >/dev/null 2>&1
          if grep 'trusted_users = ' /etc/exim.conf.tmp >/dev/null 2>&1; then
            mv /etc/exim.conf.tmp /etc/exim.conf >/dev/null 2>&1;
          fi
        fi                        
@


1.1.2.11
log
@About to release debian version 1.2.4-1. Quite a lot of changes now.
@
text
@d3 2
a4 94
case "$1" in
    remove|purge)
      # Source debconf library
      . /usr/share/debconf/confmodule
      db_version 2.0

      db_get "horde/web_user"
      webuser="$RET"
      db_get "horde/web_group"
      webgroup="$RET"
      db_get "horde/phpversion"
      phpver="$RET"
      phpini=""
      if [ "$phpver" = "php3" ]; then
	phpini=/etc/php3/apache/php3.ini
      fi
      if [ "$phpver" = "php4" ]; then
	phpini=/etc/php4/apache/php.ini
      fi
      db_get "horde/database_type"
      dbtype="$RET"
      db_get "horde/database_server"
      dbserver="$RET"
      db_get "horde/database_name"
      dbname="$RET"
      db_get "horde/database_user"
      dbuser="$RET"
      db_get "horde/database_pass"
      dbpass="$RET"
      db_get "horde/webserver_type"
      webtype="$RET"
      db_get "horde/dbconfigured"
      dbconfigured="$RET"
      db_get "horde/dblocal"
      dblocal="$RET"
      db_get "horde/horderecheck"
      hrecheck="$RET"
      db_get "horde/restart"
      restart="$RET"

      # These shortnames allow us to make sed statements common
      case $dbtype in
	MySql)
	  mydbtype="mysql"
	;;
	PostgreSQL)
	  mydbtype="pgsql"
	;;
      esac

      # Allows us to loop and substitute in one pass
      case $webtype in
	Apache)
	  mywebtype="apache"
	;;
	Apache-SSL)
	  mywebtype="apache-ssl"
	;;
	Both)
	  mywebtype="apache apache-ssl"
	;;
	*)
	  mywebtype="none"
	;;
      esac

      for server in $mywebtype; do   
        if [ ! -f /etc/$server/httpd.conf ]; then
	  mywebtype="none"
	fi
      done

      db_input "critical" "horde/remove"  || true
      db_go

      ##################################################################################
      ########################### Exim unconfigure #####################################
      ##################################################################################
      if [ "$hrecheck" = "yes" ]; then
	if [ -e /etc/exim.conf ]; then
	  if grep -e "trusted_users = $webuser:" /etc/exim.conf 2>&1; then
	    echo "Modifying /etc/exim.conf to remove IMP settings";
	    /bin/sed -e 's#trusted_users = $webuser:#trusted_users = #' /etc/exim.conf > /etc/exim.conf.tmp
	    cp /etc/exim.conf /etc/exim.conf.bak >/dev/null 2>&1
	    if grep 'trusted_users = ' /etc/exim.conf.tmp >/dev/null 2>&1; then
	      mv /etc/exim.conf.tmp /etc/exim.conf >/dev/null 2>&1;
	    else
	      rm -f /etc/exim.conf.tmp
	    fi
	  fi                        
	fi
      fi
    ;;
esac
d7 14
a20 1
    remove)
a21 20
    purge)
      rm -rf /etc/horde /usr/share/horde /usr/share/doc/horde
      if [ "$hrecheck" = "yes" ]; then
        if [ "$mywebtype" = "none" ]; then
	  echo "Not unconfiguring web server"
	else 
	  for server in $mywebtype; do
            echo "Unconfiguring horde in $server..."
	    for A in /etc/$server/*.conf; do
	      if grep -e 'Include[[:space:]][[:space:]]*/etc/horde/apache.conf' $A \
		    >&/dev/null;then
		echo "Removing import for horde in $A"
	        cat $A | grep -v -e 'Include[[:space:]][[:space:]]*/etc/horde/apache.conf' > $A.new
	        mv $A.new $A
	      fi
	    done
	  done
	fi
      fi
    ;;
@


1.1.2.12
log
@Relased version 1.2.4-1.
@
text
@d100 1
a100 20
      if [ "$hrecheck" = "yes" ]; then
        if [ "$mywebtype" = "none" ]; then
	  echo "Not unconfiguring web server"
	else 
	  for server in $mywebtype; do
            echo "Unconfiguring horde in $server..."
	    for A in /etc/$server/*.conf; do
	      if grep -e \
		    '^[[:space:]]*Include[[:space:]][[:space:]]*/etc/horde/apache.conf'\
		    $A >/dev/null 2>&1;then
		echo "Commenting import for horde in $A"
	        cat $A | /bin/sed -e \
		    "s#^\( *Include */etc/horde/apache.conf\)#\#\1#" > $A.new
	        mv $A.new $A
	      fi
	    done
	  done
	fi
      fi
      ;;
d111 1
a111 1
		    >/dev/null 2>&1;then
@


1.1.2.13
log
@Major changes, next version of horde.
@
text
@a1 2
# Horde postrm script using debconf
# Written by Ola Lundqvist <opal@@debian.org>
d5 88
a92 6
	. /usr/share/debconf/confmodule
	db_version 2.0
	## PURGE!!!
	if [ "$1" = "purge" ] ; then
	    echo "Removing /etc/horde."
	    rm -Rf /etc/horde
d94 3
a96 48
	# Check external configs.
	db_get "horde/webserver_type"
	webtype="$RET"

	# Allows us to loop and substitute in one pass
	case $webtype in
	    Apache)
		mywebtype="apache"
	    ;;
	    Apache-SSL)
		mywebtype="apache-ssl"
	    ;;
	    Both)
		mywebtype="apache apache-ssl"
	    ;;
	    *)
		mywebtype=""
	    ;;
	esac
	#######################################################################
	############################ Non IMP stuff, checking ##################
	#######################################################################
	# If we're asked to check others' files
	for server in $mywebtype ; do
	    ###############################################################
	    ###################### New style config in apache #############
	    ###############################################################
	    includefile=/etc/horde/apache.conf
	    case "$1" in
		purge)
		    . /usr/share/wwwconfig-common/apache-uninclude_all.sh
		    if [ "$status" = "purge" ] ; then
			restart="$restart $server"
		    fi
		;;
		remove)
		    . /usr/share/wwwconfig-common/apache-cominclude_all.sh
		    if [ "$status" = "comment" ] ; then
			restart="$restart $server"
		    fi
		;;
	    esac
	done
	#######################################################################
	##################### Servers restart #################################
	#######################################################################
	servers="exim apache-ssl apache mysql postresql"
	. /usr/share/wwwconfig-common/restart.sh
d98 41
a138 1
	db_stop
@


1.1.2.14
log
@Fixing bashism.
@
text
@d63 1
@


