mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +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"
|
DEFINE_string update_url "" "Full url of an update image"
|
||||||
|
|
||||||
function kill_all_devservers {
|
function kill_all_devservers {
|
||||||
|
echo "Killing dev server."
|
||||||
# Using ! here to avoid exiting with set -e is insufficient, so use
|
# Using ! here to avoid exiting with set -e is insufficient, so use
|
||||||
# || true instead.
|
# || true instead.
|
||||||
sudo pkill -f devserver\.py || true
|
sudo pkill -f devserver\.py || true
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
echo "Killing dev server."
|
if [ -z "${FLAGS_update_url}" ]; then
|
||||||
kill_all_devservers
|
kill_all_devservers
|
||||||
|
fi
|
||||||
cleanup_remote_access
|
cleanup_remote_access
|
||||||
rm -rf "${TMP}"
|
rm -rf "${TMP}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user