Score:0

RemainAfterExit in Upstart

bd flag

Is there an Upstart equivalent to systemd's RemainAfterExit?

I have an upstart task that exec's a script that completes quickly when the task is started. However, I would still like that task to report as active so that I can subsequently 'stop' the task and have it execute a cleanup script.

In systemd, I would do the following:

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/local/bin/my_script.sh create %i
ExecStop=/usr/local/bin/my_script.sh delete %i

How would I do the same thing in Upstart?

Score:1
ua flag

You could either add one read statement at the end of your script to pause execution or you could use pre-start exec instead of exec as suggested here (although I can't confirm the effectiveness of this solution).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.