Skip to content
Snippets Groups Projects
Commit a4cbc73b authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

add procmgt systemd ExecStartPre commands to clean up old buffers before starting

parent f4811ca1
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,22 @@ Description=DMT procmgt service %i
After=network-online.target
[Service]
# clear out any old shared memory partitions before starting the
# process manager. This would maybe more natuarlly be an
# ExecStopPost, but those commands are given the exit status of the
# ExecStart command, which is not what we want here. NOTE the '-'
# before the script path that indicates that the exit status of this
# command is to be ignored.
ExecStartPre=-~/scripts/shm_all smkill
# add a little bit of extra time before starting, to ensure that any
# lingering stuff after a previous stop isn't lying around. This also
# would be better done after stop, but we need to find the cleanest
# way to handle that.
ExecStartPre=/bin/sleep 5
# FIXME: check that there's not a way to do these pre-start checks
# after shutdown.
ExecStart=/usr/bin/procmgt --file:/home/dmtexec/procmgt/%i --runlist start
# wait extra time because procmgt doesn't always wait for all it's
# children before exiting. We do this as an ExecStopPost so that it
# happens in all cases, not just on auto-restarts.
ExecStopPost=/bin/sleep 10
# FIXME: do we want to auto restart?
# Restart=always
# RestartSec=10
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment