podterminal/main.go

27 lines
455 B
Go
Raw Normal View History

2024-01-27 11:20:40 +01:00
package main
import (
"log"
"net"
"git.jmbit.de/jmb/podterminal/pods"
"git.jmbit.de/jmb/podterminal/utils"
"git.jmbit.de/jmb/podterminal/web"
)
func main() {
laddr := &net.TCPAddr{
IP: net.IPv4zero,
Port: 80,
}
listener, err := net.ListenTCP("tcp", laddr)
if err != nil {
log.Fatal("could not bind to port 80", err)
}
pods.ConnectSocket()
// Dumm, ich weiß
utils.DropPrivileges("podterminal")
pods.Cleanup()
web.Run(listener)
}