Merge tag '0.1.3'

Release 0.1.3

- fix for manually removed configuration files

* tag '0.1.3':
  Fix handling of manually removed configuration files
This commit is contained in:
Jan Dittberner 2019-09-07 14:35:58 +02:00
commit f7ad46cc69

View file

@ -81,6 +81,7 @@ def create_web_vhost_config(username, sitename, wildcard):
domain=sitename, user=username,
docroot=_build_document_root_path(sitename, username),
wildcard=wildcard)
conffile = None
try:
nginxtemp, filename = mkstemp()
conffile = os.fdopen(nginxtemp, 'w')
@ -162,7 +163,7 @@ def delete_web_vhost_config(sitename):
"""
try:
subprocess.check_output([
SUDO_CMD, RM_CMD, _build_vhost_config_path(sitename)],
SUDO_CMD, RM_CMD, "-f", _build_vhost_config_path(sitename)],
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as cpe:
log_and_raise(
@ -182,6 +183,7 @@ def create_web_php_fpm_pool_config(username):
"""
conftmpl = _get_template('fpmpool.conf')
confdata = conftmpl.render(user=username)
conffile = None
try:
fpmtemp, filename = mkstemp()
conffile = os.fdopen(fpmtemp, 'w')
@ -216,7 +218,7 @@ def delete_web_php_fpm_pool_config(username):
"""
try:
subprocess.check_output([
SUDO_CMD, RM_CMD, _build_php_fpm_pool_file(username)],
SUDO_CMD, RM_CMD, "-f", _build_php_fpm_pool_file(username)],
stderr=subprocess.STDOUT)
subprocess.check_output([
SUDO_CMD, SERVICE_CMD, 'php5-fpm', 'reload'],