Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 086c311de3dada9f57eb2f5c6aacb4e4 > files > 15

openca-0.9.3-0.rc1.1mdv2008.0.src.rpm

#!/bin/bash

# (C) 2006 Oden Eriksson <oeriksson@mandriva.com>
# This program is Free Software under the GNU General Public License (>=v2).
# Read the file COPYING that comes with this packages for details.

if [ -z "$1" ]; then
    WEB_HOST_NAME=`hostname --fqdn`
else
    WEB_HOST_NAME="$1"
fi

if [ -z "$2" ]; then
    LDAP_HOST_NAME=`hostname --fqdn`
else
    LDAP_HOST_NAME="$2"
fi

pushd /etc/openca >/dev/null 2>&1
    perl -pi -e "s|_WEB_HOST_NAME_|$WEB_HOST_NAME|g" config.xml
    perl -pi -e "s|_LDAP_HOST_NAME_|$LDAP_HOST_NAME|g" config.xml
    sh ./configure_etc.sh
popd >/dev/null 2>&1

/etc/rc.d/init.d/openca restart >/dev/null 2>&1