From 3b64bfa7e0ca0fe3e5c8c3e9b51fbdb832511874 Mon Sep 17 00:00:00 2001 From: krakenrf <78108016+krakenrf@users.noreply.github.com> Date: Tue, 1 Nov 2022 23:47:33 +1300 Subject: add sudo heatbeat It's possible that some peoples trouble with the install scripts is due to the sudo timeout limit expiring before the script finishes, if the user has a very slow machine or slow network connection. Added a sudo heartbeat thread to keep the timeout alive. --- install_scripts/krakensdr_x86_install_doa_pr.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install_scripts/krakensdr_x86_install_doa_pr.sh b/install_scripts/krakensdr_x86_install_doa_pr.sh index fb19873..4f1f30e 100644 --- a/install_scripts/krakensdr_x86_install_doa_pr.sh +++ b/install_scripts/krakensdr_x86_install_doa_pr.sh @@ -1,4 +1,16 @@ #!/bin/bash + +# Prevent sudo timeout +sudo -v # ask for sudo password up-front +while true; do + # Update user's timestamp without running a command + sudo -nv; sleep 1m + # Exit when the parent process is not running any more. In fact this loop + # would be killed anyway after being an orphan(when the parent process + # exits). But this ensures that and probably exit sooner. + kill -0 $$ 2>/dev/null || exit +done & + sudo apt update sudo apt -y install build-essential git cmake libusb-1.0-0-dev lsof libzmq3-dev clang php-cli nodejs gpsd libfftw3-3 libfftw3-dev -- cgit v1.2.3