发表于 2018-11-28 06:03:54

linux RPM包安装的APACHE服务的启动脚本

# The semantics of these two functions differ from the way apachectl does  # things -- attempting to start while running is a failure, and shutdown
  # when not running is also a failure.So we just do it the way init scripts
  # are expected to behave here.
  start() {
  echo -n $"Starting $prog: "
  check13 || exit 1
  LANG=$HTTPD_LANG daemon $httpd $OPTIONS
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && touch ${lockfile}
  return $RETVAL
  }
  stop() {
  echo -n $"Stopping $prog: "
  killproc $httpd
  RETVAL=$?
  echo
  [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
  }
  reload() {
  echo -n $"Reloading $prog: "
  if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
  RETVAL=$?

  echo $"not>
  failure $"not>  else
  killproc $httpd -HUP
  RETVAL=$?
  fi
  echo
  }

页: [1]
查看完整版本: linux RPM包安装的APACHE服务的启动脚本