API + Data changes to support split up of stream keys and admin passwords
This commit is contained in:
6
main.go
6
main.go
@@ -42,7 +42,7 @@ func main() {
|
||||
|
||||
// Create the data directory if needed
|
||||
if !utils.DoesFileExists("data") {
|
||||
if err := os.Mkdir("./data", 0700); err != nil {
|
||||
if err := os.Mkdir("./data", 0o700); err != nil {
|
||||
log.Fatalln("Cannot create data directory", err)
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func main() {
|
||||
log.Fatalln("Unable to remove temp dir!")
|
||||
}
|
||||
}
|
||||
if err := os.Mkdir(config.TempDir, 0700); err != nil {
|
||||
if err := os.Mkdir(config.TempDir, 0o700); err != nil {
|
||||
log.Fatalln("Unable to create temp dir!", err)
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ func main() {
|
||||
|
||||
func handleCommandLineFlags() {
|
||||
if *newStreamKey != "" {
|
||||
if err := data.SetStreamKey(*newStreamKey); err != nil {
|
||||
if err := data.SetAdminPassword(*newStreamKey); err != nil {
|
||||
log.Errorln("Error setting your stream key.", err)
|
||||
log.Exit(1)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user