MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / set_hosts

Method set_hosts

class/projectModel/javaModel.py:1499–1509  ·  view source on GitHub ↗

@name 建立本地HOST

(self, domain)

Source from the content-addressed store, hash-verified

1497 return public.returnMsg(False, '不存在')
1498
1499 def set_hosts(self, domain):
1500 '''
1501 @name 建立本地HOST
1502 '''
1503 pass
1504 ret = public.ReadFile('/etc/hosts')
1505 # if isinstance(ret, str):
1506 # import re
1507 # rec = '%s' % domain
1508 # if not re.search(rec, ret):
1509 # public.ExecShell('echo "127.0.0.1 ' + domain + '" >> /etc/hosts')
1510
1511 @staticmethod
1512 def set_spring_user():

Callers 2

Calls 1

ReadFileMethod · 0.45

Tested by

no test coverage detected