Find the answer to your Linux question:
Results 1 to 3 of 3
Hello everyone i have installed lighttpd from source on my distribution i installed it in /usr/local/lighttpd . now when i try to start its script in /etc/init.d,it works fine [root@maria ...
  1. #1
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281

    problem with lighttpd script

    Hello everyone
    i have installed lighttpd from source on my distribution
    i installed it in /usr/local/lighttpd .
    now when i try to start its script in /etc/init.d,it works fine
    [root@maria inx-bilal]# /etc/init.d/lighttpd start
    Starting lighttpd: [ OK ]
    but it doesnt work for stop command
    [root@maria inx-bilal]# /etc/init.d/lighttpd stop
    Stopping lighttpd: [FAILED]
    also
    [root@maria inx-bilal]# /etc/init.d/lighttpd status
    lighttpd dead but pid file exists
    i want to know that do i have to change the path in /etc/init.d/lighttpd or not. Also please do tell me what does this status message shows do this mean that lighttpd is installed
    script file locate in /etc/init.d/lighttpd is as follows
    # Source function library
    . /etc/rc.d/init.d/functions

    if [ -f /etc/sysconfig/lighttpd ]; then
    . /etc/sysconfig/lighttpd
    fi

    if [ -z "$LIGHTTPD_CONF_PATH" ]; then
    LIGHTTPD_CONF_PATH="/etc/lighttpd/lighttpd.conf"
    fi

    prog="lighttpd"
    lighttpd="/usr/local/sbin/lighttpd"
    RETVAL=0

    start() {
    echo -n $"Starting $prog: "
    daemon $lighttpd -f $LIGHTTPD_CONF_PATH
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
    }

    stop() {
    echo -n $"Stopping $prog: "
    killproc $lighttpd
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
    return $RETVAL
    }

    reload() {
    echo -n $"Reloading $prog: "
    killproc $lighttpd -HUP
    RETVAL=$?
    echo
    return $RETVAL
    }

    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    start
    ;;
    condrestart)
    if [ -f /var/lock/subsys/$prog ]; then
    stop
    start
    fi
    ;;
    reload)
    reload
    ;;
    status)
    status $lighttpd
    RETVAL=$?
    ;;
    *)
    echo $"Usage: $0 {start|stop|restart|condrestart|reload|status}"
    RETVAL=1
    esac

    exit $RETVAL
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  2. #2
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    anybody interested in repling to my this query
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

  3. #3
    Linux User bilal_jan's Avatar
    Join Date
    Mar 2008
    Location
    Pakistan
    Posts
    281
    hello anybody home!
    Linux is basically a simple operating system, but you have to be a genious to understand the simplicaity - Dennis Ritchie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...