Redhat7 开机启动服务
#!/bin/sh
### BEGIN INIT INFO
# Provides: jboss
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Management of JBoss AS v7.x
### END INIT INFO
case "$1" in
start)
echo "Starting JBoss"
sudo -u javau sh /apps/xxx/scripts/TPS/startJBoss --instanceName=xxxx
;;
stop)
echo "Stopping JBoss"
sudo -u javau sh /apps/xxx/scripts/TPS/stopJBoss --instanceName=xxxxx
;;
log)
echo "Showing server.log..."
tail -1000f /apps/xxx/logs/jboss-eap/700/TPS/xxxxx/server.log
;;
*)
echo "Usage: /etc/init.d/jboss {start|stop|log}"
exit 1
;; esac
exit 0
refer to https://developer.jboss.org/wiki/HowToInstallJBossAS7AsALinuxService
refer to https://blog.csdn.net/cds86333774/article/details/51165361
refer to https://blog.csdn.net/qq_25821067/article/details/79120222
如果您喜欢我,可以通过微信请我喝果汁。
如果有疑问,可以留言或者发邮件给我 lhh_nj@163.com