Find the answer to your Linux question:
Results 1 to 2 of 2
I have apache on a freebsd box but it does not start up at boot. I have created a script that does not work. Probably because I dunno anything about ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416

    Apache startup script


    I have apache on a freebsd box but it does not start up at boot.
    I have created a script that does not work. Probably because I dunno anything about scripting

    #!/bin/sh

    if [-x /usr/local/apache/bin/apachectl start]; then
    /usr/local/apache/bin/apachectl start &
    fi

    What does -x stand for?

    Cheers
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's right, that won't work. Use this instead:
    [code]#!/bin/sh

    if [ -x /usr/local/apache/bin/apachectl ]; then
    /usr/local/apache/bin/apachectl start
    fi
    [code]
    -x tests so that the file is executable. Run "help test" in bash for more info.

Posting Permissions

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