Welcome, guest | Sign In | My Account | Store | Cart
#!/bin/bash

# Set up correctly depending on the distribution
if [ -f /etc/redhat-release ]
then
  # Redhat
  . /etc/init.d/functions

  HTTP_DAEMON_START="/usr/sbin/httpd"

elif [ -f /etc/SuSE-release ]
then
  # SuSE
  . /etc/rc.status

  echo_success()
  {
      rc_reset
      rc_status -v
  }
  echo_failure()
  {
      rc_failed
      rc_status -v
  }

  HTTP_DAEMON_START="/usr/sbin/httpd"

elif [ -f /etc/debian_version ]
then
  # Debian
  echo_success()
  {
      echo success
  }
  echo_failure()
  {
      echo failure
  }

  HTTP_DAEMON_START="start-stop-daemon --start --chuid root --exec /usr/sbin/httpd --"

else
  # Other distos
  echo_success()
  {
      echo success
  }
  echo_failure()
  {
      echo failure
  }

  if [ -f /etc/init.d/functions.sh ]
  then
       . /etc/init.d/functions.sh
       HTTP_DAEMON_START="start-stop-daemon --start --chuid root --exec /usr/sbin/httpd --"
  else
       HTTP_DAEMON_START="/usr/sbin/httpd"
  fi
fi

History

  • revision 2 (12 years ago)
  • previous revisions are not available