Merge branch 'hotfix/0.1.3' into production
* hotfix/0.1.3: Fix handling of manually removed configuration files
This commit is contained in:
commit
636372506a
1 changed files with 4 additions and 2 deletions
|
@ -81,6 +81,7 @@ def create_web_vhost_config(username, sitename, wildcard):
|
||||||
domain=sitename, user=username,
|
domain=sitename, user=username,
|
||||||
docroot=_build_document_root_path(sitename, username),
|
docroot=_build_document_root_path(sitename, username),
|
||||||
wildcard=wildcard)
|
wildcard=wildcard)
|
||||||
|
conffile = None
|
||||||
try:
|
try:
|
||||||
nginxtemp, filename = mkstemp()
|
nginxtemp, filename = mkstemp()
|
||||||
conffile = os.fdopen(nginxtemp, 'w')
|
conffile = os.fdopen(nginxtemp, 'w')
|
||||||
|
@ -162,7 +163,7 @@ def delete_web_vhost_config(sitename):
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
subprocess.check_output([
|
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)
|
stderr=subprocess.STDOUT)
|
||||||
except subprocess.CalledProcessError as cpe:
|
except subprocess.CalledProcessError as cpe:
|
||||||
log_and_raise(
|
log_and_raise(
|
||||||
|
@ -182,6 +183,7 @@ def create_web_php_fpm_pool_config(username):
|
||||||
"""
|
"""
|
||||||
conftmpl = _get_template('fpmpool.conf')
|
conftmpl = _get_template('fpmpool.conf')
|
||||||
confdata = conftmpl.render(user=username)
|
confdata = conftmpl.render(user=username)
|
||||||
|
conffile = None
|
||||||
try:
|
try:
|
||||||
fpmtemp, filename = mkstemp()
|
fpmtemp, filename = mkstemp()
|
||||||
conffile = os.fdopen(fpmtemp, 'w')
|
conffile = os.fdopen(fpmtemp, 'w')
|
||||||
|
@ -216,7 +218,7 @@ def delete_web_php_fpm_pool_config(username):
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
subprocess.check_output([
|
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)
|
stderr=subprocess.STDOUT)
|
||||||
subprocess.check_output([
|
subprocess.check_output([
|
||||||
SUDO_CMD, SERVICE_CMD, 'php5-fpm', 'reload'],
|
SUDO_CMD, SERVICE_CMD, 'php5-fpm', 'reload'],
|
||||||
|
|
Loading…
Reference in a new issue