You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
2 months ago | |
---|---|---|
.gitignore | 2 months ago | |
CHANGELOG.md | 2 months ago | |
LICENSE.md | 2 months ago | |
README.md | 2 months ago | |
sudoloop | 2 months ago |
README.md
sudoloop
sudoloop
is intended for long-running scripts which run as one user but occasionally use sudo
to perform actions as another user. This works by calling sudo --validate
in a loop to keep the sudo
session alive while the script is running. For maximum portability, sudoloop
is written to work on any POSIX shell.
The simplest usage simply involves wrapping the command in sudoloop
:
sudoloop command [arg]...
Although the SUDO_LOOP_TIME
environment variable can be used to change the amount of time spent between sudo --validate
calls, in case the default time of 60 seconds is too short. The SUDO_LOOP_TIME
variable can take any string that is a valid argument to the sleep
command, which defaults to seconds:
env SUDO_LOOP_TIME=30 sudoloop command [arg]...
License
Available under the public domain via the CC0 Universal License.