|
@@ -6,15 +6,26 @@ import (
|
|
"os"
|
|
"os"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+dir: "/root/rosbag-handle/"
|
|
|
|
+name: "sh"
|
|
|
|
+args:
|
|
|
|
+ - "start-master.sh"
|
|
|
|
+*/
|
|
|
|
+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 (
|