diff --git a/.travis.yml b/.travis.yml index 02756b1..80a34df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ language: go go: - tip install: - - go get -t github.com/FreifunkBremen/respond-collector/... + - go get -t github.com/FreifunkBremen/yanic/... - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - ./.test-coverage - - go install github.com/FreifunkBremen/respond-collector/cmd/respond-collector - - go install github.com/FreifunkBremen/respond-collector/cmd/respond-query + - go install github.com/FreifunkBremen/yanic/cmd/yanic + - go install github.com/FreifunkBremen/yanic/cmd/yanic-query diff --git a/cmd/respond-query/main.go b/cmd/yanic-query/main.go similarity index 82% rename from cmd/respond-query/main.go rename to cmd/yanic-query/main.go index 5f45f98..516a262 100644 --- a/cmd/respond-query/main.go +++ b/cmd/yanic-query/main.go @@ -4,11 +4,10 @@ import ( "log" "net" "os" - "time" - "github.com/FreifunkBremen/respond-collector/models" - "github.com/FreifunkBremen/respond-collector/respond" + "github.com/FreifunkBremen/yanic/models" + "github.com/FreifunkBremen/yanic/respond" ) // Usage: respond-query wlp4s0 "[fe80::eade:27ff:dead:beef%wlp4s0]:1001" diff --git a/cmd/respond-collector/main.go b/cmd/yanic/main.go similarity index 86% rename from cmd/respond-collector/main.go rename to cmd/yanic/main.go index d40d073..251a4b7 100644 --- a/cmd/respond-collector/main.go +++ b/cmd/yanic/main.go @@ -7,11 +7,11 @@ import ( "os/signal" "syscall" - "github.com/FreifunkBremen/respond-collector/database" - "github.com/FreifunkBremen/respond-collector/models" - "github.com/FreifunkBremen/respond-collector/respond" - "github.com/FreifunkBremen/respond-collector/rrd" - "github.com/FreifunkBremen/respond-collector/webserver" + "github.com/FreifunkBremen/yanic/database" + "github.com/FreifunkBremen/yanic/models" + "github.com/FreifunkBremen/yanic/respond" + "github.com/FreifunkBremen/yanic/rrd" + "github.com/FreifunkBremen/yanic/webserver" ) var ( diff --git a/database/database.go b/database/database.go index d6d80e8..d88ba94 100644 --- a/database/database.go +++ b/database/database.go @@ -6,9 +6,10 @@ import ( "sync" "time" - "github.com/FreifunkBremen/respond-collector/models" "github.com/influxdata/influxdb/client/v2" imodels "github.com/influxdata/influxdb/models" + + "github.com/FreifunkBremen/yanic/models" ) const ( diff --git a/init/linux-systemd/respond-collector.service b/init/linux-systemd/respond-collector.service deleted file mode 100644 index 844b706..0000000 --- a/init/linux-systemd/respond-collector.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=respond-collector - -[Service] -Type=simple -User=respond-collector -ExecStart=/opt/go/bin/respond-collector -config /etc/respond-collector.conf -Restart=always -Environment=PATH=/usr/bin:/usr/local/bin - -[Install] -WantedBy=multi-user.target diff --git a/init/linux-systemd/yanic.service b/init/linux-systemd/yanic.service new file mode 100644 index 0000000..f17a43d --- /dev/null +++ b/init/linux-systemd/yanic.service @@ -0,0 +1,12 @@ +[Unit] +Description=yanic + +[Service] +Type=simple +User=yanic +ExecStart=/opt/go/bin/yanic -config /etc/yanic.conf +Restart=always +Environment=PATH=/usr/bin:/usr/local/bin + +[Install] +WantedBy=multi-user.target diff --git a/meshviewer/meshviewer.go b/meshviewer/meshviewer.go index 35fcfb7..b2e3f4d 100644 --- a/meshviewer/meshviewer.go +++ b/meshviewer/meshviewer.go @@ -1,8 +1,8 @@ package meshviewer import ( - "github.com/FreifunkBremen/respond-collector/data" - "github.com/FreifunkBremen/respond-collector/jsontime" + "github.com/FreifunkBremen/yanic/data" + "github.com/FreifunkBremen/yanic/jsontime" ) // Node struct diff --git a/models/graph_test.go b/models/graph_test.go index 023996d..a87f2e7 100644 --- a/models/graph_test.go +++ b/models/graph_test.go @@ -5,8 +5,9 @@ import ( "io/ioutil" "testing" - "github.com/FreifunkBremen/respond-collector/data" "github.com/stretchr/testify/assert" + + "github.com/FreifunkBremen/yanic/data" ) type TestNode struct { diff --git a/models/node.go b/models/node.go index 851562f..76f4303 100644 --- a/models/node.go +++ b/models/node.go @@ -4,10 +4,11 @@ import ( "net" "strconv" - "github.com/FreifunkBremen/respond-collector/data" - "github.com/FreifunkBremen/respond-collector/jsontime" - "github.com/FreifunkBremen/respond-collector/meshviewer" imodels "github.com/influxdata/influxdb/models" + + "github.com/FreifunkBremen/yanic/data" + "github.com/FreifunkBremen/yanic/jsontime" + "github.com/FreifunkBremen/yanic/meshviewer" ) // Node struct diff --git a/models/node_test.go b/models/node_test.go index 4ebefed..ff18c9b 100644 --- a/models/node_test.go +++ b/models/node_test.go @@ -3,8 +3,9 @@ package models import ( "testing" - "github.com/FreifunkBremen/respond-collector/data" "github.com/stretchr/testify/assert" + + "github.com/FreifunkBremen/yanic/data" ) func TestToInflux(t *testing.T) { diff --git a/models/nodes.go b/models/nodes.go index 3881d73..128c453 100644 --- a/models/nodes.go +++ b/models/nodes.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/FreifunkBremen/respond-collector/data" - "github.com/FreifunkBremen/respond-collector/jsontime" - "github.com/FreifunkBremen/respond-collector/meshviewer" + "github.com/FreifunkBremen/yanic/data" + "github.com/FreifunkBremen/yanic/jsontime" + "github.com/FreifunkBremen/yanic/meshviewer" ) // Nodes struct: cache DB of Node's structs diff --git a/models/nodes_test.go b/models/nodes_test.go index d1d9694..af3efbd 100644 --- a/models/nodes_test.go +++ b/models/nodes_test.go @@ -6,8 +6,9 @@ import ( "testing" "time" - "github.com/FreifunkBremen/respond-collector/data" "github.com/stretchr/testify/assert" + + "github.com/FreifunkBremen/yanic/data" ) func TestExpire(t *testing.T) { diff --git a/models/stats_test.go b/models/stats_test.go index 9608ef0..20b0a0f 100644 --- a/models/stats_test.go +++ b/models/stats_test.go @@ -3,8 +3,9 @@ package models import ( "testing" - "github.com/FreifunkBremen/respond-collector/data" "github.com/stretchr/testify/assert" + + "github.com/FreifunkBremen/yanic/data" ) func TestGlobalStats(t *testing.T) { diff --git a/respond/collector.go b/respond/collector.go index 542511f..f13f6fb 100644 --- a/respond/collector.go +++ b/respond/collector.go @@ -7,13 +7,12 @@ import ( "log" "net" "time" - "fmt" - "github.com/FreifunkBremen/respond-collector/data" - "github.com/FreifunkBremen/respond-collector/database" - "github.com/FreifunkBremen/respond-collector/jsontime" - "github.com/FreifunkBremen/respond-collector/models" + "github.com/FreifunkBremen/yanic/data" + "github.com/FreifunkBremen/yanic/database" + "github.com/FreifunkBremen/yanic/jsontime" + "github.com/FreifunkBremen/yanic/models" ) // Collector for a specificle respond messages