#!/bin/bash

. /etc/sysconfig/xshttpd

PIDFILE=${PIDFILE:-/var/run/httpd.pid}
PROGRAM=${PROGRAM:-/usr/bin/httpd}
CONTROLPROGRAM=${CONTROLPROGRAM:-/usr/bin/httpdc}
RUNLEVEL=3
NEEDS="+network +remote_fs"

. /etc/init.d/smgl_init

restart() {
  if [[ -f $PIDFILE ]]; then
    $CONTROLPROGRAM restart
    evaluate_retval
  else
    run_func start
  fi
}

stop() {
  $CONTROLPROGRAM stop
  evaluate_retval
}

status() {
  $CONTROLPROGRAM status
}

reload() {
  run_func restart
}
