I suggest crashing if DISPLAY is unset and instead make sure it is set correctly in the cron script that will trigger this run. The proposed change is fine as well, but if we ever need to shell out to another graphical process again, we have to repeat the hack. The cron script is where all commands are triggered, so it seems a better place for it, IMHO.
Right now all django commands are run through /etc/cron.daily/django_regular_commands.
I suggest crashing if DISPLAY is unset and instead make sure it is set correctly in the cron script that will trigger this run. The proposed change is fine as well, but if we ever need to shell out to another graphical process again, we have to repeat the hack. The cron script is where all commands are triggered, so it seems a better place for it, IMHO.
Right now all django commands are run through /etc/cron. daily/django_ regular_ commands.