mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #6379 from doublerr/apacheTasks
fix spacing, switch to cmd.retcode
This commit is contained in:
commit
1040387b8a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user