孟令鑫 1 年之前
父节点
当前提交
ca1833c237

+ 16 - 0
kinglong/common/cfg/local-config-soc1.yaml

@@ -0,0 +1,16 @@
+# 数据闭环平台参数
+equipment-no: kinglong3
+secret-key: 8EGgsLqCer8j7VR0q12emEAcrHQ3x1jh8pX9MZIa
+# 获取oss连接信息的接口url
+url-get-oss-config: http://36.110.106.156:18379/oss/config?token=nXonLUcMtGcrQqqKiyygIwyVbvizE0wD
+# 金龙车数据前缀
+oss-base-prefix: kinglong/
+# oss上的配置文件的名称
+cloud-config-filename: cloud-config.yaml
+# 将oss上的配置文件下载到本地的路径
+cloud-config-local-path: /mnt/media/sda1/rosbag-handle/config/cloud-config.yaml
+restart-cmd:
+  dir: "/mnt/media/sda1/rosbag-handle/"
+  name: "sh"
+  args:
+    - "start-soc1.sh"

+ 16 - 0
kinglong/common/cfg/local-config-soc2.yaml

@@ -0,0 +1,16 @@
+# 数据闭环平台参数
+equipment-no: kinglong3
+secret-key: 8EGgsLqCer8j7VR0q12emEAcrHQ3x1jh8pX9MZIa
+# 获取oss连接信息的接口url
+url-get-oss-config: http://36.110.106.156:18379/oss/config?token=nXonLUcMtGcrQqqKiyygIwyVbvizE0wD
+# 金龙车数据前缀
+oss-base-prefix: kinglong/
+# oss上的配置文件的名称
+cloud-config-filename: cloud-config.yaml
+# 将oss上的配置文件下载到本地的路径
+cloud-config-local-path: /mnt/media/sda1/rosbag-handle/config/cloud-config.yaml
+restart-cmd:
+  dir: "/mnt/media/sda1/rosbag-handle/"
+  name: "sh"
+  args:
+    - "start-soc2.sh"

+ 5 - 2
kinglong/common/cfg/local-config.yaml

@@ -9,5 +9,8 @@ oss-base-prefix: kinglong/
 cloud-config-filename: cloud-config.yaml
 cloud-config-filename: cloud-config.yaml
 # 将oss上的配置文件下载到本地的路径
 # 将oss上的配置文件下载到本地的路径
 cloud-config-local-path: /mnt/media/sda1/rosbag-handle/config/cloud-config.yaml
 cloud-config-local-path: /mnt/media/sda1/rosbag-handle/config/cloud-config.yaml
-restart-dir: "/mnt/media/sda1/rosbag-handle/"
-restart-cmd: "start.sh"
+restart-cmd:
+  dir: "/mnt/media/sda1/rosbag-handle/"
+  name: "sh"
+  args:
+    - "start-master.sh"

+ 13 - 8
kinglong/common/cfg/local_cfg.go

@@ -6,15 +6,20 @@ import (
 	"os"
 	"os"
 )
 )
 
 
+type restartCmd struct {
+	Dir  string   `yaml:"dir"`
+	Name string   `yaml:"name"`
+	Args []string `yaml:"args"`
+}
+
 type localConfig struct {
 type localConfig struct {
-	UrlGetOssConfig      string `yaml:"url-get-oss-config"`      // 获取oss配置的url
-	OssBasePrefix        string `yaml:"oss-base-prefix"`         // 云端配置文件的位置
-	EquipmentNo          string `yaml:"equipment-no"`            // 当前设备的编号
-	CloudConfigFilename  string `yaml:"cloud-config-filename"`   // 云端配置文件名称
-	CloudConfigLocalPath string `yaml:"cloud-config-local-path"` // 将 oss 的配置文件下载到本地的位置
-	SecretKey            string `yaml:"secret-key"`              // 当前设备的密钥
-	RestartDir           string `yaml:"restart-dir"`             // 重启命令执行的目录
-	RestartCmd           string `yaml:"restart-cmd"`             // 重启命令
+	UrlGetOssConfig      string     `yaml:"url-get-oss-config"`      // 获取oss配置的url
+	OssBasePrefix        string     `yaml:"oss-base-prefix"`         // 云端配置文件的位置
+	EquipmentNo          string     `yaml:"equipment-no"`            // 当前设备的编号
+	CloudConfigFilename  string     `yaml:"cloud-config-filename"`   // 云端配置文件名称
+	CloudConfigLocalPath string     `yaml:"cloud-config-local-path"` // 将 oss 的配置文件下载到本地的位置
+	SecretKey            string     `yaml:"secret-key"`              // 当前设备的密钥
+	RestartCmd           restartCmd `yaml:"restart-cmd"`             // 重启命令
 }
 }
 
 
 var (
 var (

+ 0 - 6
pji/common/cfg/local_cfg.go

@@ -6,12 +6,6 @@ import (
 	"os"
 	"os"
 )
 )
 
 
-/*
-dir: "/root/rosbag-handle/"
-name: "sh"
-args:
-  - "start-master.sh"
-*/
 type restartCmd struct {
 type restartCmd struct {
 	Dir  string   `yaml:"dir"`
 	Dir  string   `yaml:"dir"`
 	Name string   `yaml:"name"`
 	Name string   `yaml:"name"`