#######################################
## Do Not Edit
## san2(at)linuxchannel.net
########################################
##
## apache.lib

apache_install_preview() {
        if [ "$foundapache" != "0" ] ; then
            echo "${T_MD}[$i] ${APACHE_V}${T_ME} install to [/usr/local/apache]"
        echo "    (+) mod_so Enable"
        echo "    (+) mod_rewrite Enable"
        #echo "    (X) mod_status Disable"
        if [ "$foundphp" != "0" ] ; then
            echo "    (-) php support"
        fi
        echo "    (X) mod_python NOT support"
        if [ "$foundmod_ssl" != "0" ] ; then
            echo "    (-) mod_ssl support"
        fi

        i=$(($i+1))
    else
                echo "*** Notice!!! ${T_MR}Not found${T_ME} ${WORK}/apache_xxx.tar.gz"
                echo "*** Do you have TWO(2) apache_xxx.tar.gz ???"
    fi
}

check_apache_run() {

    ## modify 2001.02.28 exclude khttpd
    ##
    run_apache_pidnum=`ps -ef | grep "httpd" | egrep -v "(khttpd|grep)" | wc -l 2> /dev/null`

    if [ $run_apache_pidnum -gt 1 ] ; then

        echo ""
        echo "Your machine are running HTTPD!!!"
        echo "So, You must be shutdown HTTPd!!!"
        echo "Because, MySQL to installing!!!"

        process "(Apache)httpd shutdown" "apachedown"

        if [ "$skipapachedown" != "1" ] ; then
            killall httpd 2>> $ERRORFILE &
            addfile "" $DONEFILE
            addfile "WARNING !!!" $DONEFILE
            addfile "killall httpd : (old)httpd shutdowned !!!" $DONEFILE
            addfile "" $DONEFILE
        fi

        fi
}