Skip to content

Instantly share code, notes, and snippets.

@jsamuel1
Created January 27, 2021 23:25
Show Gist options
  • Save jsamuel1/67fd4c5b9e463cb74f5a0832341abf0e to your computer and use it in GitHub Desktop.
Save jsamuel1/67fd4c5b9e463cb74f5a0832341abf0e to your computer and use it in GitHub Desktop.

Revisions

  1. jsamuel1 created this gist Jan 27, 2021.
    2 changes: 2 additions & 0 deletions sudokeepalive.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # 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 &