-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathmain.go
49 lines (37 loc) · 913 Bytes
/
main.go
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
40
41
42
43
44
45
46
47
48
49
package main
import (
"TukTuk/backend"
"TukTuk/config"
"TukTuk/database"
"TukTuk/dnslistener"
"TukTuk/emailalert"
"TukTuk/httplistener"
"TukTuk/httpslistener"
"TukTuk/ldaplistener"
"TukTuk/smblistener"
"TukTuk/smtplistener"
"TukTuk/telegrambot"
)
func main() {
config.StartInit()
domain := config.Settings.DomainConfig.Name
//start telegram bot
telegrambot.BotStart()
emailalert.EmailAlertStart(config.Settings.EmailAlert.Enabled, config.Settings.EmailAlert.To)
//connect to database
db := database.Connect()
//start http server
go httplistener.StartHTTP(db)
//start https server
go httpslistener.StartHTTPS(db)
//start dns server
go dnslistener.StartDNS(domain)
//start smtp server
go smtplistener.StartSMTP(db, domain)
//start ldap server
go ldaplistener.StartLDAP(domain)
//start smb
go smblistener.StartSMBAccept(db)
//start backend
backend.StartBack(db, domain)
}