mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 05:55:06 +00:00
Add check to avoid running databaseReset as root accidentally
This commit is contained in:
committed by
Philip Sargent
parent
8b74ff4bb6
commit
227120fd57
@@ -6,6 +6,10 @@ import timeit
|
||||
import json
|
||||
|
||||
import settings
|
||||
if os.geteuid() == 0:
|
||||
print("This script should be run as expo not root - quitting")
|
||||
exit()
|
||||
|
||||
os.environ['PYTHONPATH'] = settings.PYTHON_PATH
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user