blob: 5665d8668331b091029fdf605173ae2c90dd9b22 (
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
|
package main
import (
"log"
"os"
"os/signal"
"syscall"
"xengineering.eu/ceres/model"
)
func main() {
model.InitStorage()
defer model.RemoveStorage()
model.InitDatabase()
defer model.CloseDatabase()
listener := make(chan os.Signal)
signal.Notify(listener, syscall.SIGTERM)
signal.Notify(listener, syscall.SIGINT)
sig := <-listener
log.Printf("Cleaning up due to OS signal '%v'\n", sig)
}
|