Skip to content

Commit

Permalink
chore: #2 chmod the executable
Browse files Browse the repository at this point in the history
  • Loading branch information
bohdan-shulha committed Jun 28, 2024
1 parent deb738d commit c305c13
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/ptah-agent/ptah-agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@ var version string = "dev"
func main() {
baseUrl := os.Getenv("PTAH_BASE_URL")
if baseUrl == "" {
log.Println("PTAH_BASE_URL is not set, using http://localhost:8000")
log.Println("PTAH_BASE_URL is not set, using https://app.ptah.sh")

baseUrl = "http://localhost:8000"
baseUrl = "https://app.ptah.sh"
}

baseUrl = strings.Trim(baseUrl, "/")
baseUrl = fmt.Sprintf("%s/api/_nodes/v1", baseUrl)

ptahToken := os.Getenv("PTAH_TOKEN")
if ptahToken == "" {
log.Println("PTAH_TOKEN is not set, using localhost-ptah-token")

ptahToken = "localhost-ptah-token"
log.Fatalln("PTAH_TOKEN is not set")
}

agent := ptahAgent.New(version, baseUrl, ptahToken)
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ mkdir -p \$HOME/ptah-agent/versions/0.0.0
curl -L https://github.com/ptah-sh/ptah-agent/releases/latest/download/ptah-agent-linux-x86_64 -o \$SEED_VERSION/ptah-agent
chmod +x \$SEED_VERSION/ptah-agent
ln -nsf \$SEED_VERSION/ptah-agent \$HOME/ptah-agent/current
EOF
Expand Down

0 comments on commit c305c13

Please sign in to comment.