about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2018-09-08 02:11:02 +0200
committermaride <maride@darknebu.la>2018-09-08 02:11:02 +0200
commitcbf9d2e98405081f83755725583c5ef3b5666ec3 (patch)
tree5c58e27dfa708ed04c97167d0a5afdae029562cd /src
parent1384b2ef7864ec85d94f4616b1c42339a7286333 (diff)
Seed the random number generator at start
Diffstat (limited to 'src')
-rw-r--r--src/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.go b/src/main.go
index ff76b45..91e453e 100644
--- a/src/main.go
+++ b/src/main.go
@@ -3,9 +3,11 @@ package main
 import (
 	"flag"
 	"log"
+	"math/rand"
 	"net/http"
 	"os"
 	"os/signal"
+	"time"
 )
 
 func main() {
@@ -25,6 +27,10 @@ func main() {
 		log.Fatalln(readChallengesError.Error())
 	}
 
+	// Seed the random number generator
+	log.Println("Seed random number generator")
+	rand.Seed(time.Now().UTC().UnixNano())
+
 	// Start our VPN container and network
 	log.Printf("Starting VPN container ('%s')", vpnContainerName)
 	startVPNError := startVPN()