mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
Only kill the dev server when it is started by image_to_live process.
Review URL: http://codereview.chromium.org/1986012
This commit is contained in:
parent
f87a3678dd
commit
3c784f78fe
@ -25,14 +25,16 @@ DEFINE_integer devserver_port 8080 \
|
||||
DEFINE_string update_url "" "Full url of an update image"
|
||||
|
||||
function kill_all_devservers {
|
||||
echo "Killing dev server."
|
||||
# Using ! here to avoid exiting with set -e is insufficient, so use
|
||||
# || true instead.
|
||||
sudo pkill -f devserver\.py || true
|
||||
}
|
||||
|
||||
function cleanup {
|
||||
echo "Killing dev server."
|
||||
kill_all_devservers
|
||||
if [ -z "${FLAGS_update_url}" ]; then
|
||||
kill_all_devservers
|
||||
fi
|
||||
cleanup_remote_access
|
||||
rm -rf "${TMP}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user