Sample Header Ad - 728x90

RemainAfterExit in Upstart

1 vote
0 answers
96 views
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?
Asked by Brandon E Taylor (91 rep)
Oct 7, 2021, 08:08 PM