Fix restart bug
This commit is contained in:
parent
90fff773b2
commit
8f8691423b
1 changed files with 4 additions and 5 deletions
|
|
@ -95,20 +95,19 @@ class General:
|
||||||
if self.use_dbus:
|
if self.use_dbus:
|
||||||
self.session = DBusContainerService().GetSession()
|
self.session = DBusContainerService().GetSession()
|
||||||
if self.session:
|
if self.session:
|
||||||
DBusContainerService().Stop(False)
|
DBusContainerService().Stop(False)
|
||||||
else:
|
else:
|
||||||
run(["waydroid", "container", "stop"])
|
run(["waydroid", "container", "stop"])
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
if self.use_dbus:
|
if self.use_dbus and self.session:
|
||||||
DBusContainerService().Start(self.session)
|
DBusContainerService().Start(self.session)
|
||||||
else:
|
else:
|
||||||
run(["systemctl", "restart", "waydroid-container.service"])
|
run(["systemctl", "restart", "waydroid-container.service"])
|
||||||
|
|
||||||
def restart(self):
|
def restart(self):
|
||||||
if DBusContainerService().GetSession():
|
self.stop()
|
||||||
self.stop()
|
self.start()
|
||||||
self.start()
|
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue