17 lines
532 B
Bash
17 lines
532 B
Bash
#!/bin/bash
|
|
|
|
export DJANGO_SETTINGS_MODULE={{ env.settings }}
|
|
set -a
|
|
source {{ env.project_dir }}/env
|
|
|
|
# PYTHONPATH variable is not preserved by sudo.
|
|
|
|
# Clear out expired Django sessions.
|
|
sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin clearsessions
|
|
|
|
sudo --user={{ env.app_user }} --preserve-env PYTHONPATH={{ env.project_dir }}:$PYTHONPATH {{ env.virtualenv }}/bin/django-admin expunge_deleted
|
|
|
|
|
|
# Local Variables:
|
|
# mode: shell-script-mode
|
|
# End:
|