Litespeed is not uninstalling..help! I can't restart apache.

Discussion in 'General' started by grep, Jun 17, 2008.

  1. grep

    grep New Member

    I ran the script you guys say to use:

    Code:
    root@ns1 [/opt/lsws/admin/misc]# ./uninstall.sh
    
    WARNING:
    
    All sub directories under "/opt/lsws"
    created during installation will be removed!
    However, conf/ and logs/ can be optionally preserved.
    If you want to preserve any file under the other sub-directories created
    by installation script, please backup before proceeding.
    
    Manually created sub-directories under "/opt/lsws"
    will not be touched.
    
    Do you want to uninstall LiteSpeed Web Server? [y/N]y
    
    Uninstalling rc scripts ...
    [OK] The startup script has been successfully uninstalled!
    
    Do you want to keep server configuration files? [y/N]n
    
    Do you want to keep server log files? [y/N]y
    
    LiteSpeed Web Server has been successfully uninstalled.
    
    Now when I try to restart it gives an error and all my sites are down:

    Code:
    root@ns1 [~]# service httpd restart
    /usr/local/apache/bin/httpd: line 49: /opt/lsws/bin/lswsctrl: No such file or directory
    
    And there's all old stuff Litespeed stuff in /usr/local/apache/bin/httpd:

    Code:
    #!/bin/sh
    
    ARGS="$@"
    ARG1="$1"
    
    LSWS_HOME=/opt/lsws
    APACHE_BIN=/usr/local/apache/bin/httpd
    
    CTRL_APACHE=1
    
    APACHE=/usr/local/apache/bin/httpd_ls_bak
    
    
    LSWS=$LSWS_HOME/bin/lswsctrl
    PARAM_LOG=$LSWS_HOME/logs/ap_cmd_param.log
    
    echo "`date`: $@" >> $PARAM_LOG
    
    ulimit -v unlimited
    
    if [ "x$ARG1" = 'x-DSSL' ]; then
       shift
       ARG1=$1
    fi
    
    if [ "x$ARG1" = 'x' ]; then
        $LSWS start
        
    elif [ "x$ARG1" = 'x-k' ]; then
        ARG2=$2
        case $ARG2 in
        start|startssl|sslstart|start-SSL)
        $LSWS start
        ERR=$?
        if [ "x$CTRL_APACHE" == "x1" ]; then
            $APACHE $ARGS
        fi
        $?=$ERR
        ;;
        stop|graceful-stop)
        # never stop LSWS here, use "service lsws stop" instead
        if [ "x$CTRL_APACHE" == "x1" ]; then
            $APACHE $ARGS
        else
            echo ""
        fi
        ;;
        restart|graceful)
        $LSWS restart
        ;;
        *)
        $APACHE $ARGS
        esac
    else
        if [ "x$ARG1" = "xuninstall" ]; then
            if [ "x$CTRL_APACHE" == "x0" ]; then
                $LSWS stop
                sleep 1
            fi
            mv $APACHE $APACHE_BIN
            $APACHE_BIN 
        elif [ "x$ARG1" = "xinstall" ]; then
            if [ "x$CTRL_APACHE" == "x0" ]; then
                killall `basename $APACHE_BIN`
            fi
            $LSWS start
        else
            $APACHE $ARGS
        fi
    fi
    
    ERROR=$?
    exit $ERROR
    
  2. mistwang

    mistwang LiteSpeed Staff

    do

    cp /usr/local/apache/bin/httpd_ls_bak /usr/local/apache/bin/httpd
  3. grep

    grep New Member

    Your a life saver! How do I prevent this from happening again?

    Thanks for the super quick response

Share This Page