2

In an upstart configuration how do I define what command should be used to shutdown a server. Lets say I have daemon that has two seperate processes.

  • startup.sh - to start the server
  • shutdown.sh - to shut down the server

Suppose I have an upstart file that looks like this.

description "Some Example Service"
author "Me"

start on runlevel [2345]
stop on runlevel [016]
respawn

exec satrtup.sh 

How do I tell upstart that it should called shutdown.sh when shutting down the server? How does upstart normally expect to shut down a daemon?

0

Normal shutdown consists of signaling TERM then KILL 5 seconds later. Use pre-start exec shutdown.sh for your situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.