Created
January 27, 2021 23:25
-
-
Save jsamuel1/67fd4c5b9e463cb74f5a0832341abf0e to your computer and use it in GitHub Desktop.
sudo Keep-alive for scripts: update existing `sudo` time stamp until script has finished
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Keep-alive: update existing `sudo` time stamp until script has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment