Added system.CopyDir and EdgeappsBackupPath conf

This commit is contained in:
=
2023-06-10 17:29:54 +02:00
parent e009c1f55d
commit 8bf26a334c
4 changed files with 103 additions and 12 deletions
+8
View File
@@ -109,6 +109,7 @@ const CloudEnvFileLocation string = "cloudEnvFileLocation"
const ApiEnvFileLocation string = "apiEnvFileLocation"
const ApiPath string = "apiPath"
const EdgeAppsPath string = "edgeAppsPath"
const EdgeAppsBackupPath string = "edgeAppsBackupPath"
const WsPath string = "wsPath"
// GetPath : Returns either the hardcoded path, or a overwritten value via .env file at project root. Register paths here for seamless working code between dev and prod environments ;)
@@ -156,6 +157,13 @@ func GetPath(pathKey string) string {
targetPath = "/home/system/components/apps/"
}
case EdgeAppsBackupPath:
if env["EDGEAPPS_BACKUP_PATH"] != "" {
targetPath = env["EDGEAPPS_BACKUP_PATH"]
} else {
targetPath = "/home/system/components/backups/"
}
case WsPath:
if env["WS_PATH"] != "" {