1
0
Fork 0
forked from External/grumble

Hook up new freezer code to the server.

This commit is contained in:
Mikkel Krautz 2011-08-27 15:15:23 +02:00
parent ff299b8aa4
commit eb4f3319fd
8 changed files with 744 additions and 447 deletions

View file

@ -5,11 +5,8 @@
package main
import (
"fmt"
"log"
"os"
"os/signal"
"path/filepath"
)
func SignalHandler() {
@ -18,15 +15,6 @@ func SignalHandler() {
if sig != os.SIGINT && sig != os.SIGTERM {
continue
}
for sid, s := range servers {
err := s.FreezeToFile(filepath.Join(*datadir, fmt.Sprintf("%v", sid)))
if err != nil {
log.Printf("Unable to freeze server %v: %s", sid, err.String())
continue
}
log.Printf("Server %v frozen", sid)
}
os.Exit(0)
}
}