-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinit.go
32 lines (26 loc) · 882 Bytes
/
init.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
package MythicContainer
import (
"github.com/MythicMeta/MythicContainer/logging"
"github.com/MythicMeta/MythicContainer/rabbitmq"
"os"
)
type MythicServices = string
const (
MythicServicePayload MythicServices = "payload"
MythicServiceLogger MythicServices = "logger"
MythicServiceWebhook MythicServices = "webhook"
MythicServiceC2 MythicServices = "c2"
MythicServiceTranslationContainer MythicServices = "translation"
MythicServiceEventing MythicServices = "eventing"
MythicServiceAuth MythicServices = "auth"
)
func StartAndRunForever(services []MythicServices) {
if len(services) == 0 {
logging.LogError(nil, "Must supply at least one MythicService to start")
os.Exit(0)
}
rabbitmq.Initialize()
rabbitmq.StartServices(services)
forever := make(chan bool)
<-forever
}