Spelendora

Untitled

Apr 21st, 2017
292
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if 'test -f /var/run/uwsgi/uwsgi.pid' {
  2.  
  3. exec {'restart uwsgi':
  4.   command => 'kill -HUP `cat /var/run/uwsgi/uwsgi.pid`',
  5.   require => [
  6.       Exec['makemigrations'],
  7.       Service['uwsgi']],
  8.     }
  9.  
  10.     notify { 'uwsgi restarted': }
  11. }
  12.  
  13. else {
  14.  
  15. exec {'start server':
  16.   command => 'uwsgi --master --emperor /etc/uwsgi/apps-enabled --daemonize /var/log/uwsgi/uwsgi_emperor.log --pidfile /var/run/uwsgi/uwsgi.pid',
  17.   require => [
  18.       Exec['makemigrations'],
  19.       Service['uwsgi']],
  20.     }
  21.  
  22.     notify { 'uwsgi started': }
  23. }
RAW Paste Data