mirror of https://github.com/zulip/zulip.git
manage.py: Give a nice error message if run as root on posix systems.
If the os is posix, this will check to see if the user is root and alert them to run as zulip user if so. Fixes #114.
This commit is contained in:
parent
e4cea98ccd
commit
ea65715ef8
|
@ -5,6 +5,9 @@ import logging
|
|||
import subprocess
|
||||
|
||||
if __name__ == "__main__":
|
||||
if 'posix' in os.name and os.geteuid() == 0:
|
||||
from django.core.management.base import CommandError
|
||||
raise CommandError("manage.py should not be run as root.")
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
||||
|
||||
from django.conf import settings
|
||||
|
|
Loading…
Reference in New Issue