Skip to content
Snippets Groups Projects
Commit 4711856c authored by ale's avatar ale
Browse files

prevent broken updates when no master is set

parent e0e4d90d
No related branches found
No related tags found
No related merge requests found
package node
import (
"errors"
"log"
"os"
"os/exec"
)
......@@ -30,6 +32,11 @@ func (ic *IcecastController) reload() error {
}
func (ic *IcecastController) Update(conf *ClusterConfig, isMaster bool, masterAddr string) error {
if !isMaster && masterAddr == "" {
log.Printf("system in unknown state (no master) - update aborted")
return errors.New("unknown system state")
}
tmpf := ic.ConfigFile + ".tmp"
defer os.Remove(tmpf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment