From 66b7cf525f64ca091dc7f426ea399bda8b0bc3b3 Mon Sep 17 00:00:00 2001 From: meow Date: Wed, 27 Nov 2019 23:48:38 +0500 Subject: [PATCH] alternative radvd restart command added --- host/virtualmachine.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/host/virtualmachine.py b/host/virtualmachine.py index 53de948..e9fb919 100755 --- a/host/virtualmachine.py +++ b/host/virtualmachine.py @@ -103,9 +103,10 @@ def update_radvd_conf(etcd_client): with open('/etc/radvd.conf', 'w') as radvd_conf: radvd_conf.writelines(content) - - sp.check_output(['systemctl', 'restart', 'radvd']) - + try: + sp.check_output(['systemctl', 'restart', 'radvd']) + except Exception: + sp.check_output(['service', 'radvd', 'restart']) def get_start_command_args(vm_entry, vnc_sock_filename: str, migration=False, migration_port=None): threads_per_core = 1