From 01c9cdd60ac661b57f8b129e1a4759d6f8088b96 Mon Sep 17 00:00:00 2001
From: Erik Brakkee
Date: Tue, 30 Jul 2024 23:48:52 +0200
Subject: [PATCH] usage fix (agent was renamed by intellij to session)
Now using embedded timezone database by go so setting the TZ variable will work.
---
cmd/converge/converge.go | 2 ++
compose.yaml | 1 +
kubernetes/deployment.yaml | 2 ++
pkg/server/templates/usage.templ | 4 ++--
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmd/converge/converge.go b/cmd/converge/converge.go
index 35ebfde..50c8598 100644
--- a/cmd/converge/converge.go
+++ b/cmd/converge/converge.go
@@ -15,6 +15,7 @@ import (
"regexp"
"strconv"
"strings"
+ _ "time/tzdata"
)
func parsePublicId(path string) (publicId string, _ error) {
@@ -53,6 +54,7 @@ func printHelp(msg string) {
}
func main() {
+
downloadDir := "../static"
args := os.Args[1:]
diff --git a/compose.yaml b/compose.yaml
index 95d93bf..2dbb4b8 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -10,3 +10,4 @@ services:
environment:
CONVERGE_USERNAME: abc
CONVERGE_PASSWORD: "123"
+ TZ: "Japan"
diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml
index 120a39c..88ec4d3 100644
--- a/kubernetes/deployment.yaml
+++ b/kubernetes/deployment.yaml
@@ -27,5 +27,7 @@ spec:
- name: CONVERGE_PASSWORD
# change this password in your final deployment
value: "abc123"
+ - name: TZ
+ value: Europe/Amsterdam
diff --git a/pkg/server/templates/usage.templ b/pkg/server/templates/usage.templ
index 8154bc8..31abe8b 100644
--- a/pkg/server/templates/usage.templ
+++ b/pkg/server/templates/usage.templ
@@ -12,13 +12,13 @@ templ Usage(secure string, host string, username string) {
{`
# linux
- `}curl http{secure}://{host}/static/session > session{`
+ `}curl http{secure}://{host}/static/agent > agent{`
chmod 755 agent
`}./agent --id ID ws{secure}://{host}{`
rm -f agent
# windows
- `}curl http{secure}://{host}/static/session.exe > session.exe{`
+ `}curl http{secure}://{host}/static/agent.exe > agent.exe{`
`}agent --id ID ws{secure}://{host}{`
del agent.exe
`}