blob: 572e5f9019f17ae9c714b9b72007fa23f85fbcef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// vim: shiftwidth=4 tabstop=4 noexpandtab
package main
import (
"log"
)
var (
config RuntimeConfig
camera Camera
transporter Transporter
)
func main() {
// disable log timestamp because systemd takes care of that
log.SetFlags(0)
// parse flags and read config
config = GetRuntimeConfig()
// print startup message
log.Println("Starting birdscan")
// create camera
camera = NewCamera()
// setup transporter
transporter = NewTransporter()
go transporter.Run() // daemon to copy files via rsync
// start goroutines
server := NewWebServer()
go server.run() // http server / user interface
// run camera
camera.run()
}
|