mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
init.d-posix: exit on error
This fixes a case where the px4 startup is not stopped when the px4 process is killled using -SIGKILL against the px4 deamon. In that case, the currently executing command/client is killed and properly shutting down with result -1, however, the next command is started anyway. This means that the next time we try to run the simulation we get a "PX4 daemon already running for instance 0" error and PX4 doesn't start properly. By adding exit on error, we properly exit in the case where the startup script gets stopped/killed.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# PX4 commands need the 'px4-' prefix in bash.
|
# PX4 commands need the 'px4-' prefix in bash.
|
||||||
# (px4-alias.sh is expected to be in the PATH)
|
# (px4-alias.sh is expected to be in the PATH)
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|||||||
Reference in New Issue
Block a user