]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/actions/container_manager.py
tools: Add restart container
[waydroid.git] / tools / actions / container_manager.py
index ce04180b1414f1fdf478c888bd27b93effc184e1..776ced94a61a6fc7e99080d9f1ec2a6b729f1ae2 100644 (file)
@@ -213,6 +213,14 @@ def stop(args):
     else:
         logging.error("WayDroid container is {}".format(status))
 
+def restart(args):
+    status = helpers.lxc.status(args)
+    if status == "RUNNING":
+        helpers.lxc.stop(args)
+        helpers.lxc.start(args)
+    else:
+        logging.error("WayDroid container is {}".format(status))
+
 def freeze(args):
     status = helpers.lxc.status(args)
     if status == "RUNNING":