Skip to content

Commit

Permalink
Use systemctl instead of service which is a wrapper around systemctl …
Browse files Browse the repository at this point in the history
…in Debian 8 and newer
  • Loading branch information
pavel-shirshov committed Jul 24, 2018
1 parent 88c5ea5 commit 7ebdb4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _stop_services():
'teamd',
]
for service in services:
run_command("service %s stop" % service, display_cmd=True)
run_command("systemctl stop %s" % service, display_cmd=True)

def _restart_services():
services = [
Expand All @@ -167,7 +167,7 @@ def _restart_services():
'dhcp_relay',
]
for service in services:
run_command("service %s restart" % service, display_cmd=True)
run_command("systemctl restart %s" % service, display_cmd=True)


# This is our main entrypoint - the main 'config' command
Expand Down
2 changes: 1 addition & 1 deletion config/mlnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
SNIFFER_CONF_FILE = '/etc/supervisor/conf.d/mlnx_sniffer.conf'

# Command to restart swss service
COMMAND_RESTART_SWSS = 'service swss restart'
COMMAND_RESTART_SWSS = 'systemctl restart swss.service'

# global variable SDK_SNIFFER_TARGET_FILE_NAME
SDK_SNIFFER_TARGET_FILE_NAME = ''
Expand Down

0 comments on commit 7ebdb4c

Please sign in to comment.