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
parent 35f85c55f1
commit 501a5122d8

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