Fix systemctl commands
This commit is contained in:
parent
fc544b68cd
commit
4f396c606f
1 changed files with 3 additions and 3 deletions
|
@ -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 = '/bin/systemctl'
|
||||
INSTALL_CMD = '/usr/bin/install'
|
||||
|
||||
JINJAENV = Environment(loader=PackageLoader('webtasks', 'templates'))
|
||||
|
@ -117,7 +117,7 @@ def disable_web_vhost(sitename):
|
|||
SUDO_CMD, RM_CMD, "-f", _build_enabled_vhost_path(sitename)],
|
||||
stderr=subprocess.STDOUT)
|
||||
subprocess.check_output([
|
||||
SUDO_CMD, SERVICE_CMD, 'nginx', 'reload'],
|
||||
SUDO_CMD, SERVICE_CMD, 'reload', 'nginx'],
|
||||
stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as cpe:
|
||||
log_and_raise(
|
||||
|
@ -143,7 +143,7 @@ def enable_web_vhost(sitename):
|
|||
_build_enabled_vhost_path(sitename)],
|
||||
stderr=subprocess.STDOUT)
|
||||
subprocess.check_output([
|
||||
SUDO_CMD, SERVICE_CMD, 'nginx', 'restart'],
|
||||
SUDO_CMD, SERVICE_CMD, 'restart', 'nginx'],
|
||||
stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as cpe:
|
||||
log_and_raise(
|
||||
|
|
Loading…
Reference in a new issue