aebde425ecfb — Joe Ulfers 6 months ago
add restorecon
1 files changed, 5 insertions(+), 0 deletions(-)

M deploy.sh
M deploy.sh +5 -0
@@ 45,6 45,11 @@ ssh -T root@qwertywar.com << POST
   pip --disable-pip-version-check install -r /var/www/qwertywar/app/requirements.txt
   deactivate
 
+  # Pip installing the .so files gives them selinux type httpd_sys_content_t
+  # instead of httpd_exec_t, so importing the module fails. I'm not sure why,
+  # the context gets set wrong when restorecon fixes the problem
+  restorecon -r /var/www/qwertywar
+
   systemctl reload httpd
   touch /var/www/qwertywar/app/wsgi.py  # makes mod_wsgi restart app
 POST