Commit 326a7211 authored by 金凯强's avatar 金凯强 🎨

环境变量修改

parent 95e4dad2
......@@ -5,7 +5,7 @@ from set_proxy import set_linux_global_proxy, set_docker_service_proxy, set_doce
set_gitlab_runner_git_proxy
if __name__ == "__main__":
HSCUSCODE, ip_and_port = init_env()
HSCUSCODE = init_env()
# set_linux_global_proxy(ip_and_port)
#
......
......@@ -23,19 +23,22 @@ def init_env():
print(HSDB_USER)
HSDB_PASSWORD = input("请输入数据库密码HSDB_PASSWORD:")
print(HSDB_PASSWORD)
HSDB_NAME = input("请输入ERP数据库名称HSDB_NAME(默认HsGmtERP):")
print(HSDB_NAME)
# HSDB_NAME = input("请输入ERP数据库名称HSDB_NAME(默认HsGmtERP):")
# print(HSDB_NAME)
MESDB_NAME = input("请输入MES数据库名称MESDB_NAME(默认HsGmtMES):")
if MESDB_NAME == '':
MESDB_NAME = 'HsGmtMES'
print(MESDB_NAME)
HSDB_NAME = MESDB_NAME
HSPASSWORD = "huansi.net"
is_proxy = input("是否设置代理,确认请输入Y,输入N不设置代理:")
if is_proxy.upper() == 'Y':
ip_and_port = input("请输入代理的ip地址和端口(列如192.168.1.1:808):").strip()
# CCProxy代理默认端口808
if ":" not in ip_and_port:
ip_and_port = ip_and_port + ":808"
else:
ip_and_port = None
# is_proxy = input("是否设置代理,确认请输入Y,输入N不设置代理:")
# if is_proxy.upper() == 'Y':
# ip_and_port = input("请输入代理的ip地址和端口(列如192.168.1.1:808):").strip()
# # CCProxy代理默认端口808
# if ":" not in ip_and_port:
# ip_and_port = ip_and_port + ":808"
# else:
# ip_and_port = None
env = dict(HSCUSCODE=HSCUSCODE,
HSDB_HOST=HSDB_HOST,
......@@ -55,7 +58,7 @@ def init_env():
print('环境变量设置成功,目标文件为/etc/profile.d/huansi.sh')
# 返回客户编号和代理地址
return HSCUSCODE, ip_and_port
return HSCUSCODE
elif flag == "N":
continue
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment