Merge pull request #6379 from doublerr/apacheTasks

fix spacing, switch to cmd.retcode
This commit is contained in:
Thomas S Hatch 2013-07-27 16:40:05 -07:00
commit 1040387b8a

View File

@ -251,6 +251,7 @@ def userdel(pwfile, user):
out = __salt__['cmd.run'](cmd).splitlines()
return out
def check_site_enabled(site):
'''
Checks to see if the specific Site symlink is in /etc/apache2/sites-enabled
@ -269,7 +270,7 @@ def a2ensite(site):
command = 'a2ensite {0}'.format(site)
try:
status = __salt__['cmd.run'](command)
status = __salt__['cmd.retcode'](command)
except Exception as e:
return e
@ -292,11 +293,10 @@ def a2dissite(site):
command = 'a2dissite {0}'.format(site)
try:
status = __salt__['cmd.run'](command)
status = __salt__['cmd.retcode'](command)
except Exception as e:
return e
ret['Name'] = 'Apache2 Disable Site'
ret['Site'] = site