Project

General

Profile

« Previous | Next » 

Revision 509cf1e3

Added by Frédéric Péters almost 13 years ago

wcsinstd: use os.system to reload apache

View differences:

wcsinst/wcsinstd/deploy.py
def reload_apache(self):
fd = None
try:
fd = os.popen('sudo -S /etc/init.d/apache2 reload', 'w')
print >> fd, 'plop' # this is not the password
except Exception, e:
pass
if fd:
try:
fd.close()
except IOError:
pass
os.system('sudo -n /etc/init.d/apache2 reload')

Also available in: Unified diff