mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 22:42:10 +01:00
1. the dev server running with python 2.6 now, not python.
2. I dont fully understand why we need sudo inside this script. So I am removing it. Since I could not enter sudo password inside crontab. Please let me know if I missed anything and I could revert. Review URL: http://codereview.chromium.org/666002
This commit is contained in:
parent
a2c6844e2c
commit
83b50104dd
@ -22,10 +22,11 @@ DEFINE_boolean update_known_hosts ${FLAGS_FALSE} \
|
|||||||
function kill_all_devservers {
|
function kill_all_devservers {
|
||||||
# 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.
|
||||||
pkill -f 'python devserver.py' || true
|
pkill -fx ".*devserver\.py" || true
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
|
echo "Killing dev server."
|
||||||
kill_all_devservers
|
kill_all_devservers
|
||||||
rm -rf "${TMP}"
|
rm -rf "${TMP}"
|
||||||
}
|
}
|
||||||
@ -37,7 +38,6 @@ function remote_reboot_sh {
|
|||||||
|
|
||||||
function start_dev_server {
|
function start_dev_server {
|
||||||
kill_all_devservers
|
kill_all_devservers
|
||||||
sudo -v
|
|
||||||
./enter_chroot.sh "cd ../platform/dev; ./start-devserver.sh>/dev/null 2>&1" &
|
./enter_chroot.sh "cd ../platform/dev; ./start-devserver.sh>/dev/null 2>&1" &
|
||||||
echo -n "Waiting on devserver to start"
|
echo -n "Waiting on devserver to start"
|
||||||
until netstat -anp 2>&1 | grep 8080 > /dev/null; do
|
until netstat -anp 2>&1 | grep 8080 > /dev/null; do
|
||||||
@ -123,7 +123,7 @@ function remote_reboot {
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
REMOTE_OUT=""
|
REMOTE_OUT=""
|
||||||
# This may fail while the machine is done so generate output and a
|
# This may fail while the machine is down so generate output and a
|
||||||
# boolean result to distinguish between down/timeout and real failure
|
# boolean result to distinguish between down/timeout and real failure
|
||||||
! remote_sh_allow_changed_host_key \
|
! remote_sh_allow_changed_host_key \
|
||||||
"echo 0; [ -e /tmp/awaiting_reboot ] && echo '1'; true"
|
"echo 0; [ -e /tmp/awaiting_reboot ] && echo '1'; true"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user