websoft9/docker/w9appmanage/hostname.py

6 lines
338 B
Python
Raw Normal View History

2023-08-26 18:24:53 +08:00
from api.utils.log import myLogger
2023-08-02 16:53:47 +08:00
from api.utils import shell_execute
shell_execute.execute_command_output_all("sed -i '/websoft9-appmanage/d' /etc/hosts")
2023-08-26 18:24:53 +08:00
shell_execute.execute_command_output_all("echo $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage) websoft9-appmanage >> /etc/hosts")