Skip to content

Commit

Permalink
add timeout command before dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartz committed Sep 19, 2024
1 parent 35be8c7 commit 9a9e740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/dispatch-event.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description=Dispatch the {{event}} event on {{unit}}
[Service]
Type=oneshot
# For juju 3 and juju 2 compatibility. The juju-run binary was renamed to juju-exec for juju 3.
ExecStart=/usr/bin/timeout "{{timeout}}" /usr/bin/run-one /usr/bin/bash -c '/usr/bin/juju-exec "{{unit}}" "JUJU_DISPATCH_PATH={{event}} ./dispatch" || /usr/bin/juju-run "{{unit}}" "JUJU_DISPATCH_PATH={{event}} ./dispatch"'
ExecStart=/usr/bin/timeout "{{timeout}}" /usr/bin/run-one /usr/bin/bash -c '/usr/bin/juju-exec "{{unit}}" "JUJU_DISPATCH_PATH={{event}} /usr/bin/timeout {{timeout}} ./dispatch" || /usr/bin/juju-run "{{unit}}" "JUJU_DISPATCH_PATH={{event}} /usr/bin/timeout {{timeout}} ./dispatch"'

[Install]
WantedBy=multi-user.target

0 comments on commit 9a9e740

Please sign in to comment.