From 688a9863a77c1be39cca735c8103ccf38a7d16ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=8F=E9=9C=9C?= Date: Thu, 5 Dec 2024 11:13:52 +0800 Subject: [PATCH] update system service --- .computenest/ros_templates/template.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.computenest/ros_templates/template.yaml b/.computenest/ros_templates/template.yaml index 50288c9..f790f77 100644 --- a/.computenest/ros_templates/template.yaml +++ b/.computenest/ros_templates/template.yaml @@ -249,21 +249,22 @@ Resources: # 本地不存在镜像,且为私有镜像则进行登录registry if [ "${AcrUsername}" != "" ]; then echo "login to docker registry" - AcrRepoName=$(echo ${ImagePullPath} | awk -F/ '{print $1}') - docker login $AcrRepoName --username=${AcrUsername} --password=${AcrPassword} + server=$(echo ${ImagePullPath} | awk -F/ '{print $1}') + docker login $server --username=${AcrUsername} --password=${AcrPassword} fi fi # 保存环境变量 mkdir -p /opt/applicationmanager touch /opt/applicationmanager/app.env + yum install -y jq echo ${EnvVar} | jq -r '.[] | to_entries | .[] | "\(.key)=\(.value)"' >> /opt/applicationmanager/app.env # 停止已有的服务 - systemctl stop docker-application + systemctl stop aliyun-applicationmanager # 创建系统服务 - cat > /etc/systemd/system/docker-application.service < /etc/systemd/system/aliyun-applicationmanager.service <