Commits

Garth Johnson committed 025d631

Fixed minor confusion on apache default site desablement

Comments (0)

Files changed (1)

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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.