Compare commits

..

No commits in common. "fc544b68cdb09be89e715d5b670741f0b8c673f5" and "f7ad46cc69263cb59d3c9f0b8307e32b68a9b95d" have entirely different histories.

View file

@ -21,7 +21,7 @@ _LOGGER = get_task_logger(__name__)
SUDO_CMD = '/usr/bin/sudo'
RM_CMD = '/bin/rm'
LN_CMD = '/bin/ln'
SERVICE_CMD = '/sbin/systemctl'
SERVICE_CMD = '/usr/sbin/service'
INSTALL_CMD = '/usr/bin/install'
JINJAENV = Environment(loader=PackageLoader('webtasks', 'templates'))
@ -198,6 +198,9 @@ def create_web_php_fpm_pool_config(username):
stderr=subprocess.STDOUT)
subprocess.check_output([
SUDO_CMD, RM_CMD, filename], stderr=subprocess.STDOUT)
subprocess.check_output([
SUDO_CMD, SERVICE_CMD, 'php5-fpm', 'reload'],
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as cpe:
log_and_raise(cpe, 'could not configure PHP FPM for %s', username)
return True
@ -217,6 +220,9 @@ def delete_web_php_fpm_pool_config(username):
subprocess.check_output([
SUDO_CMD, RM_CMD, "-f", _build_php_fpm_pool_file(username)],
stderr=subprocess.STDOUT)
subprocess.check_output([
SUDO_CMD, SERVICE_CMD, 'php5-fpm', 'reload'],
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as cpe:
log_and_raise(
cpe, 'could not delete PHP FPM configuration for %s', username)