Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 9b6791df4cf4519ef3665b4582852508 > scriptlet

apache-mod_ssl-2.0.54-6mdk.x86_64.rpm

POSTIN

/bin/sh
if [ $1 = "1" ]; then 
  #Create a self-signed server key and certificate 
  #The script checks first if they exists, if yes, it exits, 
  #otherwise, it creates them.

  if [ -d /etc/ssl/apache ];then

    # fix upgrade if needed since apache certs is now in /etc/ssl/apache/
    if [ -f /etc/ssl/apache/server.crt.rpmsave -a ! -f /etc/ssl/apache/server.crt.rpmsave -a ! -f /etc/ssl/apache/server.crt ]; then
    cp -p /etc/ssl/apache/server.crt.rpmsave /etc/ssl/apache/server.crt; fi

    if [ -f /etc/ssl/apache/server.key.rpmsave -a ! -f /etc/ssl/apache/server.key.rpmsave -a ! -f /etc/ssl/apache/server.key ]; then
    cp -p /etc/ssl/apache/server.key.rpmsave /etc/ssl/apache/server.key; fi

    pushd /etc/ssl/apache > /dev/null
    yes ""|/usr/lib64/ssl/apache-mod_ssl/gentestcrt.sh >/dev/null 
    popd > /dev/null
  fi
fi
/usr/share/rpm-helper/create-file apache-mod_ssl $1 /var/cache/httpd/mod_ssl/scache.dir apache root 0600 
/usr/share/rpm-helper/create-file apache-mod_ssl $1 /var/cache/httpd/mod_ssl/scache.pag apache root 0600 
/usr/share/rpm-helper/create-file apache-mod_ssl $1 /var/cache/httpd/mod_ssl/scache.sem apache root 0600 

if [ -f /var/lock/subsys/httpd ]; then
    /etc/rc.d/init.d/httpd restart 1>&2;
fi

POSTUN

/bin/sh
if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
        /etc/rc.d/init.d/httpd restart 1>&2
    fi
fi