Skip to content

Commit

Permalink
add makefile, fix jobs check, and deploy files
Browse files Browse the repository at this point in the history
  • Loading branch information
joshrendek committed Jul 11, 2014
1 parent e532ce8 commit e7f4663
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
trex-client/trex
trex
sysward
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
gxc -target="linux/amd64" build -o trex sysward_agent/src
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
gxc -target="linux/amd64" build -o trex sysward_agent/src
gxc -target="linux/amd64" build -o sysward sysward_agent/src
6 changes: 6 additions & 0 deletions config.deploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"host": "sysward.com",
"protocol": "http",
"interval": "15s",
"api_key": "APIKEY"
}
2 changes: 1 addition & 1 deletion src/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func getJobs(config ConfigSettings) []Job {
jobsResponse := api.GetJobs()

logMsg(jobsResponse)
if jobsResponse == "" {
if jobsResponse == "{}" || jobsResponse == "" {
return jobs
} else {
err := json.Unmarshal([]byte(jobsResponse), &jobs)
Expand Down
8 changes: 8 additions & 0 deletions sysward-agent.deploy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
start on runlevel [2345]
stop on runlevel [!2345]

respawn

script
exec /opt/sysward/bin/sysward
end script

0 comments on commit e7f4663

Please sign in to comment.