Commits

Mikhail Korobov  committed 61ea887

apache_is_running function

  • Participants
  • Parent commits 145ef78

Comments (0)

Files changed (1)

File fab_deploy/apache.py

     file_name = env.conf['INSTANCE_NAME'] + '.py'
     utils.upload_config_template('django_wsgi.py', wsgi_dir + file_name)
 
+@utils.run_as_sudo
+def apache_is_running():
+    """
+    Returns if apache is running
+    """
+    with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
+        output = sudo('invoke-rc.d apache2 status')
+    return output.succeeded
+
 
 @utils.run_as_sudo
 def apache_restart():