Commits

Garth Johnson committed 025d631

Fixed minor confusion on apache default site desablement

  • Participants
  • Parent commits 892f332

Comments (0)

Files changed (1)

File djaboto/management/commands/aws.py

         template = os.path.join('etc','apache2_vhost.conf')
         fab_op.put(template, target, use_sudo=True)
 
-        fab_api.prompt('Remove /etc/apache2/sites-enabled/000-default? (y/n) ', 'nopchdflt')
-
-        if fab_api.env.nopchdflt == 'y':
-            fab_api.sudo('rm /etc/apache2/sites-enabled/000-default')
+        if fab_exists('/etc/apache2/sites-enabled/000-default'):
+            fab_api.prompt('Disable 000-default? (y/n) ', 'nopchdflt')
+            if fab_api.env.nopchdflt == 'y':
+                fab_api.sudo('a2dissite 000-default')
 
         fab_api.sudo('a2ensite %s.conf' % fab_api.env.domain)