initctl: job failed to start
Below is my script which throws "initctl: Job failed to start" when i tried to run using the command "sudo initctl start sample" on linux machine. What can be the problem?
Sometimes i get post-stopped. Please anyone help me to sort this out.
NOTE: Existing solutions did't help me.
start on stopped rc RUNLEVEL=[345]
stop on starting rc RUNLEVEL=[!3]
console output
respawn
post-stop exec sleep 10
env LD_LIBRARY_
env DAEMON=
#Please note if the binary name length exceeds 15 characters, then give the fist 15 cahracters of binary name in the below pkill command.
#Otherwise pkill will not work.
env PKILL="pkill PRES"
pre-start script
su -s /bin/sh -c "$DAEMON" prakash
end script
pre-stop script
/bin/sh -c "$PKILL"
end script
script
sleepWhileAppIs
while pidof $1 >/dev/null; do
sleep 1
done
}
sleepWhileAppIsUp $DAEMON
end script
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- upstart Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: