Code

Updated debian stuff, Closes #958
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 May 2010 13:01:09 +0000 (13:01 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 May 2010 13:01:09 +0000 (13:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18775 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/debian/control
gosa-core/debian/gosa-lighttpd.conf [new file with mode: 0644]
gosa-core/debian/gosa.install
gosa-core/debian/gosa.postinst
gosa-core/debian/gosa.postrm

index 157c1c800a9fabd4c79ddd5d8e9c5702e6394fcb..704bc92cae79174f4994bffcc265290a97b963b8 100644 (file)
@@ -5,14 +5,15 @@ Maintainer: GOsa packages maintainers group <gosa-pkg@oss.gonicus.de>
 Uploaders: Cajus Pollmeier <cajus@debian.org>, Benoit Mortier <benoit.mortier@opensides.be>
 Build-Depends: debhelper (>= 5), dpatch
 Build-Depends-Indep: po-debconf
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
 Homepage: https://oss.gonicus.de/labs/gosa/
 Vcs-Browser: https://oss.gonicus.de/repositories/gosa/trunk
 Vcs-Svn: https://oss.gonicus.de/repositories/gosa/trunk
+DM-Upload-Allowed: yes
 
 Package: gosa
 Architecture: all
-Depends: php5, php5-cli, apache2-mpm-prefork, exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mhash, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, libapache2-mod-php5, ${misc:Depends}
+Depends: php5, php5-cli, apache2-mpm-prefork | lighttpd , exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, ${misc:Depends}, libapache2-mod-php5 | php5-cgi
 Suggests: gosa-si-server, cyrus21-imapd (>= 2.1.11), postfix-ldap, slapd, gosa-schema, php5-suhosin, php-apc, php-fpdf
 Description: Web Based LDAP Administration Program
  Provided is access to posix, shadow, samba, proxy, fax, pureftp and
diff --git a/gosa-core/debian/gosa-lighttpd.conf b/gosa-core/debian/gosa-lighttpd.conf
new file mode 100644 (file)
index 0000000..858c65b
--- /dev/null
@@ -0,0 +1,29 @@
+# lighttpd configuration for GOsa
+
+# Set alias to http://<host>/gosa/
+alias.url += (
+       "/gosa/" => "/usr/share/gosa/html/"
+)
+
+# Enable FastCGI and set it to handle .php URLs
+# php-cgi is run with the GOsa-required options
+server.modules += ( "mod_fastcgi" )
+
+$HTTP["url"] =~ "^/gosa/" {
+       fastcgi.server = ( ".php" =>
+               ((
+                       "bin-path" => "/usr/bin/php-cgi -d expose_php=Off -d magic_quotes_gpc=On",
+                       "socket" => "/tmp/php.socket",
+                       "max-procs" => 2,
+                       "idle-timeout" => 20,
+                       "bin-environment" => ( 
+                               "PHP_FCGI_CHILDREN" => "4",
+                               "PHP_FCGI_MAX_REQUESTS" => "10000"
+                       ),
+                       "bin-copy-environment" => (
+                               "PATH", "SHELL", "USER"
+                       ),
+                       "broken-scriptfilename" => "enable"
+               ))
+       )
+}
index 1a3408eac2a756175344cc92389170f97cf3d53d..f3bc55e2ce63d8844c00ce80b7a100ae3aff1a61 100644 (file)
@@ -7,6 +7,7 @@ locale                          /usr/share/gosa
 plugins                                /usr/share/gosa
 setup                          /usr/share/gosa
 debian/gosa-apache.conf                /etc/gosa
+debian/gosa-lighttpd.conf      /etc/gosa
 contrib/shells                 /etc/gosa
 contrib/encodings              /etc/gosa
 contrib/openldap/slapd.conf    /usr/share/doc/gosa/slapd.conf-example
index ae1081d9382b71442a7c5841902027606b9ef640..6286d073a1f75131f7790c1a460b55a89f423c1f 100644 (file)
@@ -30,20 +30,60 @@ if [ ! -f /etc/gosa/gosa.secrets ]; then
     chmod 600 /etc/gosa/gosa.secrets
 fi
 
-# Copy GOsa configuration to conf.d directories
-if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then
-
-  # Remove old instances of this file
-  if [ -f /etc/apache2/conf.d/gosa.conf ]; then
-    echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..."
-    echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!"
-    mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig
+if [ -d /etc/apache2/conf.d ]; then
+
+  # Copy GOsa configuration to conf.d directories
+  if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then
+
+    # Remove old instances of this file
+    if [ -f /etc/apache2/conf.d/gosa.conf ]; then
+      echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..."
+      echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!"
+      mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig
+    fi
+
+    echo "Making /gosa available in /etc/apache2/conf.d"
+
+    # Add GOsa include file
+    ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf
+  fi
+  
+  # Add support for RequestHeader
+  a2enmod headers
+
+  # Finally restart servers
+  if [ -x /usr/sbin/invoke-rc.d ]; then
+    invoke-rc.d apache2 reload
+  else
+    /etc/init.d/apache2 reload
+  fi
+fi
+
+if [ -d /etc/lighttpd/conf-available ]; then
+
+  # Copy GOsa configuration to conf-available directories /etc/lighttpd/conf-available
+  if [ ! -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then
+
+    # Remove old instances of this file
+    if [ -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then
+      echo "Found old gosa apache configuration in /etc/lighttpd/conf-enabled - moving it to orig.gosa-lighttpd.conf ..."
+      echo "Please check for changes in /etc/lighttpd/conf-available/orig.99gosa-lighttpd.conf if you modified this file!"
+      mv /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf /etc/lighttpd/conf-available/orig.gosa-lighttpd.conf
+    fi
+
+    echo "Making /gosa available in /etc/lighttpd/conf-enabled/"
+
+    # Add GOsa include file
+    ln -s /etc/gosa/gosa-lighttpd.conf /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf
   fi
 
-  echo "Making /gosa available in /etc/apache2/conf.d"
+  # Finally restart servers
+  if [ -x /usr/sbin/invoke-rc.d ]; then
+    invoke-rc.d lighttpd reload
+  else
+    /etc/init.d/lighttpd reload
+  fi
 
-  # Add GOsa include file
-  ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf
 fi
 
 # Add links for safe mode
@@ -61,17 +101,7 @@ chmod 770 -R /var/spool/gosa
 chown root.$WEBGROUP -R /var/cache/gosa
 chmod 770 -R /var/cache/gosa
 
-# Add support for RequestHeader
-a2enmod headers
-
 update-gosa
 
-# Finally restart servers
-if [ -x /usr/sbin/invoke-rc.d ]; then
-  invoke-rc.d apache2 reload
-else
-  /etc/init.d/apache2 reload
-fi
-
 exit 0
 
index 12252fa9166c3781c3ced44d0d85fffe5d08ba6e..6a4a072aa28b47fd2578ff53cc4633f8330be150 100644 (file)
@@ -15,17 +15,30 @@ case "$1" in
           fi
         fi
 
-        # Remove GOsa include
-        [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf
+        if [ -d /etc/apache2/conf.d ]; then
+          # Remove GOsa include
+          [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf
 
-
-        # Restart servers
-        if [ -x /usr/sbin/invoke-rc.d ]; then
+          # Restart servers
+          if [ -x /usr/sbin/invoke-rc.d ]; then
             invoke-rc.d apache2 restart
-        else
+          else
             /etc/init.d/apache2 restart
+          fi
         fi
 
+        if [ -d /etc/lighttpd/conf-available ]; then
+          # Remove GOsa include
+          [ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ] && rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf
+
+          # Restart servers
+          if [ -x /usr/sbin/invoke-rc.d ]; then
+            invoke-rc.d lighttpd restart
+          else
+            /etc/init.d/lighttpd restart
+          fi
+        fi
+        
         ;;
 
   upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)