So I have these 2 files:
/etc/init.d
- service1
- service2
service2
is like:
#!/bin/sh
# chkconfig: 2346 95 45
# description: desc
# processname: service2
### BEGIN INIT INFO
# Provides: service2
# Required-Start: service1
# Required-Stop: service1
# Default-Start: 2 3 4 6
# Default-Stop: 0 6
# Short-Description: desc
# Description: long desc
### END INIT INFO
export JAVA_HOME="/opt/java/jre"
export PATH=$JAVA_HOME/bin:$PATH
/opt/do/something.sh $*
I want, on normal boot and reboot, service2
to start after service1
ends (take about 12 minutes, it's an app-server), but they start almost at the same time and this breaks service2
.
Why is service system ignoring the dependencies I set up? Is there something wrong? Is there a way to check the correctness of boot order execution?
I'm on RHEL7 and both services have been added succesfully with
chkconfig --add <service_name>
Thank you