mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 23:04:39 -04:00
Added check to make sure script is running as root
This commit is contained in:
parent
66660ee0c2
commit
f555c8ae93
1 changed files with 5 additions and 0 deletions
|
|
@ -239,6 +239,11 @@ def authenticate():
|
|||
TODO: This should be turned into a class...
|
||||
"""
|
||||
global server, names, csr, privkey
|
||||
|
||||
# Check if root
|
||||
if not os.geteuid()==0:
|
||||
sys.exit("\nOnly root can run trustify\n")
|
||||
|
||||
if "CHOCOLATESERVER" in os.environ:
|
||||
server = os.environ["CHOCOLATESERVER"]
|
||||
if not server:
|
||||
|
|
|
|||
Loading…
Reference in a new issue