2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

Add check to avoid running databaseReset as root accidentally

This commit is contained in:
Expo on server 2020-05-26 00:47:01 +01:00 committed by Philip Sargent
parent 8b74ff4bb6
commit 227120fd57

View File

@ -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')