Jexus boot auto start configuration method

  • 2020-06-07 05:58:26
  • OfStack

How to configure Jexus to boot automatically? The details are as follows


cd /etc/init.d/  
vi jws

Paste the following in i edit mode


#!/bin/bash
#chkconfig: 2345 80 05
#description:jws
#

. /etc/rc.d/init.d/functions

case "$1" in
start)
 echo "Jexus Start.."
 /usr/jexus/jws start
 ;;
stop)
 echo "Jexus Stop.."
 /usr/jexus/jws stop
 ;;
restart)
 echo "Jexus Restart"
 /usr/jexus/jws restart
 ;;
status)
 /usr/jexus/jws status
 ;;
*)
 exit 1
 ;;
esac
exit $RETVAL

After pressing ESC, enter wq to save the file

Add this script as a "service.


chmod 766 jws
chkconfig --add jws

Reference blog:

linux jexus Service Settings boot up


Related articles: