]> git.pld-linux.org Git - packages/php4.git/blobdiff - php4-module-install
- rel 8; see cvs log php-openssl-huge-hack.patch for details
[packages/php4.git] / php4-module-install
index 331ad103f1808b25134e7f2dbad86a722fcbe4d4..ccaa6603474fbe4a463d557c6701d858ddade7bb 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-VERSION="$0 V 0.1 (C) 2001 Artur Frysiak"
+VERSION="$0 V 0.3 (c) 2001 Artur Frysiak, (c) 2005 Elan Ruusamäe"
 COMMAND=usage
 VERBOSE=""
 MODNAME=""
@@ -12,36 +12,12 @@ install()
                echo "activating module '${MODNAME}.so' in ${INIFILE}" 1>&2
                echo "extension=${MODNAME}.so" >> ${INIFILE}
        fi
-
-       # restart only if there's module installed
-       if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-       if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f /var/lock/subsys/apache ]; then
-               /etc/rc.d/init.d/apache restart 1>&2
-       fi
 }
 
 deinstall()
 {
        if [ -f ${INIFILE} ] && grep -q "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" ${INIFILE}; then
-               TMPFILE=`mktemp -q /tmp/php-module-install.XXXXXX`
-               if [ $? -ne 0 ]; then
-                       echo "$0: Can't create temp file, exiting..."
-                       exit 1
-               fi
-               echo "deactivating module '${MODNAME}.so' in ${INIFILE}" 1>&2
-               grep -v "^extension[[:space:]]*=[[:space:]]*${MODNAME}.so" > ${TMPFILE} < ${INIFILE}
-               mv ${TMPFILE} ${INIFILE}
-               chmod 644 ${INIFILE}
-       fi
-
-       # restart only if there's module installed
-       if [ -f /etc/httpd/httpd.conf/??_mod_php4.conf ] && [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
-       if [ -f /etc/apache/conf.d/??_mod_php4.conf ] && [ -f /var/lock/subsys/apache ]; then
-               /etc/rc.d/init.d/apache restart 1>&2
+               sed -i -e "/^extension[[:space:]]*=[[:space:]]*${MODNAME}.so/d" ${INIFILE}
        fi
 }
 
This page took 0.05457 seconds and 4 git commands to generate.