13 lines
344 B
Python
13 lines
344 B
Python
|
#!/usr/bin/python3
|
||
|
import docker
|
||
|
|
||
|
client = docker.from_env()
|
||
|
for container in client.containers.list():
|
||
|
if container.name == "thsf":
|
||
|
print("[+] Rebooting container<br>")
|
||
|
print(" '-> Stopping container<br>")
|
||
|
container.stop()
|
||
|
print(" '-> Starting container<br>")
|
||
|
container.start()
|
||
|
print("[\o/] Container restarted<br>")
|