forked from Mirror/pmbootstrap
Use doas instead of sudo if installed (MR 2091)
Prefer using doas over sudo if both are installed. Let the user override the sudo tool with PMB_SUDO.
This commit is contained in:
parent
2801b5d687
commit
c1407f921b
8 changed files with 60 additions and 8 deletions
|
@ -224,7 +224,10 @@ def sudo_timer_iterate():
|
|||
Run sudo -v and schedule a new timer to repeat the same.
|
||||
"""
|
||||
|
||||
subprocess.Popen(["sudo", "-v"]).wait()
|
||||
if pmb.config.sudo == "sudo":
|
||||
subprocess.Popen(["sudo", "-v"]).wait()
|
||||
else:
|
||||
subprocess.Popen([pmb.config.sudo, "true"]).wait()
|
||||
|
||||
timer = threading.Timer(interval=60, function=sudo_timer_iterate)
|
||||
timer.daemon = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue