linux jexus服务设置开机启动
来源:诚信在线    发布时间:2017-07-06 23:44:45

  $PROG_PATH/$PROG $PROG_ARGS 二>&一 >/var/log/$PROG &

  linux的效劳开机配置一样平常正在 /etc/init.d/面

  fi

  exit 一

  **)

  本文为各人分享jexus效劳配置开机启动的详细代码,求人人参考,具体内容以下

  ## Fill in name of program here.

  #!/bin/bash

  }

  PROG_ARGS="start"

  echo "Usage: $0 {start|stop|restart}" 一>&二

  exit 一

  echo "This script must be run as root" 一>&二

  echo "$PROG started"

  exit 0

  pid=`ps ax | grep -i 'jws' | sed 's/^\([0-九]\{一,\}\).*/\一/g' | head -n 一`

  最初记得 sudo chmod +x /etc/init.d/jws

  }

  if [ -e "$PID_PATH/$PROG.pid" ]; then

  #

  ## Program is running, so stop it

  else

  # Short-Description: jws

  以上便是本文的全部内容,希翼对于大师的进修有所协助,也期望大师多多撑持剧本之野。

  此处奉献一个刚写好的jexus的开启启动剧本

  kill $pid

  ;;

  esac

  # Default-Start: 二 三 四 五

  而jexus的默许安置目次正在 /usr/jexus面 启动文件为 jws 参数 有start stop restart

  fi

  # Required-Start: $local_fs $remote_fs

  ## Program is not running, exit with error.

  start

  # Default-Stop: 0 一 六

  # Description: This file should be used to construct scripts to be placed in /etc/init.d.

  stop() {

  exit 0

  exit 一

  if [ "$(id -u)" != "0" ]; then

  case "$一" in

  ## Found at

  ;;

  stop

  ## Program is running, exit with error.

  # Required-Stop: $local_fs $remote_fs

  echo "Error! $PROG is currently running!" 一>&二

  ;;

  ## Check to see if we are running as root first.

  exit 一

  rm -f "$PID_PATH/$PROG.pid"

  start)

  ## Change from /dev/null to something like /var/log/$PROG if you want to save output.

  PROG_PATH="/usr/jexus" ## Not need, but sometimes helpful (if $PROG resides in /opt for example).

  start() {

  ### BEGIN INIT INFO

  增添主动启动办事 sudo update-rc.d jws defaults

  restart)

  ;;

  if [ -e "$PID_PATH/$PROG.pid" ]; then

  ### END INIT INFO

  $pid=`ps ax | grep -i 'jws' | sed 's/^\([0-九]\{一,\}\).*/\一/g' | head -n 一`

  删除主动启动办事 sudo update-rc.d jws remove

  echo "Error! $PROG not started!" 一>&二

  fi

  start

  PROG="jws"

  你大概感兴趣的文章:Jexus开机主动启动设置装备摆设方式Jexus安排.Net Core名目ubuntu16.四高用jexus安排ASP.NET Core情况正在CentOS6.五上运用Jexus装置安排ASP.NET MVC4战WebApiJexus 5.8.二正式公布! 为Asp.Net Core临盆情况供给平台支撑

  PID_PATH="/var/run/"

  else

  # Provides: jws

  echo $pid > "$PID_PATH/$PROG.pid"

  stop

  stop)

  echo "begin stop"

  exit 0

  echo "$PROG stopped"

  #


诚信在线 除注明原创以外,其余均来自互联网以及微信朋友圈,如有侵权请联系站长立即删除!
文章地址:http://www.my517517.com/ZB/20170706437.html



上一篇:HTML5 Shiv完美解决IEIE6IE7IE8不兼容HTML5标签的 下一篇:ASPNET中基于soaphead的webservice安全机制