Compare commits

...

3 Commits

Author SHA1 Message Date
Jan Dittberner fc544b68cd Merge tag '0.1.4'
Release 0.1.4

* tag '0.1.4':
  Fix reload, use systemctl instead of service
2019-09-07 14:47:05 +02:00
Jan Dittberner 2ef6cc1ca6 Merge branch 'hotfix/0.1.4' into production
* hotfix/0.1.4:
  Fix reload, use systemctl instead of service
2019-09-07 14:46:57 +02:00
Jan Dittberner e1dd3295c1 Fix reload, use systemctl instead of service 2019-09-07 14:43:53 +02:00
1 changed files with 1 additions and 7 deletions

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 = '/usr/sbin/service'
SERVICE_CMD = '/sbin/systemctl'
INSTALL_CMD = '/usr/bin/install'
JINJAENV = Environment(loader=PackageLoader('webtasks', 'templates'))
@ -198,9 +198,6 @@ 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
@ -220,9 +217,6 @@ 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)