func init() {
	if len(os.Args) < 2 {
		usage()
	}
	log = logrus.New()
	cfg = config.Load(os.Args[1])
	if cfg.Debug != nil && *cfg.Debug {
		log.Level = logrus.DebugLevel
	} else {
		log.Level = logrus.InfoLevel
	}
}
init ensures we have a config path argument, and loads the configuration.
package main
import (
	"fmt"
	"os"
	"time"
	"github.com/pdf/golifx"
	"github.com/pdf/kodi-callback-daemon/boblight"
	"github.com/pdf/kodi-callback-daemon/config"
	"github.com/pdf/kodi-callback-daemon/hyperion"
	"github.com/pdf/kodi-callback-daemon/kodi"
	"github.com/pdf/kodi-callback-daemon/lifx"
	"github.com/pdf/kodi-callback-daemon/shell"
	"github.com/pdf/kodirpc"
	"github.com/Sirupsen/logrus"
)
const (
	VERSION = "1.5.1"
	LIFXDELAY = 3 * time.Second
)
var (
	log *logrus.Logger
	cfg config.Config
	k   *kodirpc.Client
)
func usage() {
	fmt.Fprintf(os.Stderr, "\nKodi Callback Daemon v%s\n\nUsage: %s [configFile]\n\n", VERSION, os.Args[0])
	os.Exit(1)
}