Compare commits

..

No commits in common. "2ef6cc1ca6fa2445b0cdf96efbb44e810d94fd0d" and "636372506a2508abcb2a675f15e18dd09684ee36" 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)