shutdown (failed)

Discussion in 'Technical' started by cruz, May 8, 2007.

  1. cruz

    cruz New Member

    When I shutdown the server I get this message. /etc/init.d/proftpd line 1: d:: command not found. Then I get the failed message.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/init.d/proftpd?
    Did you save that file with Unix or Windows linebreaks?
     
  3. cruz

    cruz New Member

    In Linux

    HTML:
    d: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $
    #
    # proftpd        This shell script takes care of starting and stopping
    #                proftpd.
    #
    # chkconfig: - 80 30
    # description: ProFTPD is an enhanced FTP server with a focus towards \
    #              simplicity, security, and ease of configuration. \
    #              It features a very Apache-like configuration syntax, \
    #              and a highly customizable server infrastructure, \
    #              including support for multiple 'virtual' FTP servers, \
    #              anonymous FTP, and permission-based directory visibility.
    # processname: proftpd
    # config: /etc/proftp.conf
    # pidfile: /var/run/proftpd.pid
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Source networking configuration.
    . /etc/sysconfig/network
    
    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0
    
    [ -x /usr/sbin/proftpd ] || exit 0
    
    RETVAL=0
    
    prog="proftpd"
    
    start() {
            echo -n $"Starting $prog: "
            daemon proftpd
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd
    }
    
    stop() {
            echo -n $"Shutting down $prog: "
            killproc proftpd
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proftpd
    }
    
    # See how we were called.
    case "$1" in
      start)
            start
            ;;
      stop)
            stop
            ;;
      status)
            status proftpd
            RETVAL=$?
            ;;
      restart)
            stop
            start
            ;;
      condrestart)
            if [ -f /var/lock/subsys/proftpd ]; then
              stop
              start
            fi
            ;;
      reload)
            echo -n $"Re-reading $prog configuration: "
            killproc proftpd -HUP
            RETVAL=$?
            echo
            ;;
      *)
            echo "Usage: $prog {start|stop|restart|reload|condrestart|status}"
            exit 1
    esac
    
    exit $RETVAL
    I just noticed somthing. When it reboots, it tells me it is setting proftpd to default address 172.0.0.1
     
    Last edited: May 10, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    Is this the first line of /etc/init.d/proftpd?

    Please change it to
    Code:
    #!/bin/bash
     
  5. cruz

    cruz New Member

    file change

    Thanks, I was not sure what to chage. I have no clue how that got changed.
     
    Last edited: May 11, 2007

Share This Page