Linux tomcat 自启动问题

#!/bin/bash
# chkconfig: 2345 20 80
# description: Starts and Stops the Tomcat daemon.
export JAVA_HOME=${java_home}
TOMCAT_HOME=/opt/${tomcat_service_name}
TOMCAT_START=/opt/${tomcat_service_name}/bin/startup.sh
TOMCAT_STOP=/opt/${tomcat_service_name}/bin/shutdown.sh

case $1 in
start)  
sh $TOMCAT_START
;;   
stop)     
sh $TOMCAT_STOP
;;   
restart) 
sh $TOMCAT_STOP
sleep 3
sh $TOMCAT_START 
;;   
esac
exit 0

里面有一些变量可以忽略
现在问题是centos6开机自启动没问题centos7开机脚本没有运行。

https://www.cnblogs.com/zdz8207/p/linux-tomcat-autostartup.html