I'm trying to create script for tomcat with my app as system service it's lika ok I can stop start status and restart. But I need when system going shutdown stop service fully and correctly, my app depend on a lot of resources like network and etc so seems that my service MUST be stopped first of any services. I know it can be configured somehow using special definitions like: chkconfig:, Default-Start:, Default-Stop:
etc.
my current config:
#!/bin/sh
#
# /etc/rc.d/init.d/my-service
#
# Starts the startup operations
#
# chkconfig: 345 26 74
# description: Start script for launch my service
### BEGIN INIT INFO
# Provides: my-service
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start script
# Description: Start script for launch my service
### END INIT INFO
Please help me to understand this numbers and configure it as I need, Thanks!