summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-04-17 07:55:03 -0700
committerChristopher Speller <crspeller@gmail.com>2017-04-17 10:55:03 -0400
commitacc991dea1f97e5eb93cbb1c861925d24114caca (patch)
treef7abbf45448da746dc298790e3068c616f52ccfb /cmd
parent32078865147dc4779023e036aba164842067e58b (diff)
downloadchat-acc991dea1f97e5eb93cbb1c861925d24114caca.tar.gz
chat-acc991dea1f97e5eb93cbb1c861925d24114caca.tar.bz2
chat-acc991dea1f97e5eb93cbb1c861925d24114caca.zip
PLT-6317 disable file watcher while running from makefile (#6103)
* PLT-6317 disable file watcher while running from make file * Removing debug stmt
Diffstat (limited to 'cmd')
-rw-r--r--cmd/platform/init.go1
-rw-r--r--cmd/platform/mattermost.go1
-rw-r--r--cmd/platform/server.go2
3 files changed, 4 insertions, 0 deletions
diff --git a/cmd/platform/init.go b/cmd/platform/init.go
index 0458e7a1c..7d01eb890 100644
--- a/cmd/platform/init.go
+++ b/cmd/platform/init.go
@@ -20,6 +20,7 @@ func doLoadConfig(filename string) (err string) {
utils.LoadConfig(filename)
utils.InitializeConfigWatch()
utils.EnableConfigWatch()
+
return ""
}
diff --git a/cmd/platform/mattermost.go b/cmd/platform/mattermost.go
index 9f58b3250..a4e44e016 100644
--- a/cmd/platform/mattermost.go
+++ b/cmd/platform/mattermost.go
@@ -30,6 +30,7 @@ func main() {
func init() {
rootCmd.PersistentFlags().StringP("config", "c", "config.json", "Configuration file to use.")
+ rootCmd.PersistentFlags().Bool("disableconfigwatch", false, "When set config.json will not be loaded from disk when the file is changed.")
resetCmd.Flags().Bool("confirm", false, "Confirm you really want to delete everything and a DB backup has been performed.")
diff --git a/cmd/platform/server.go b/cmd/platform/server.go
index 234721778..0d971afb6 100644
--- a/cmd/platform/server.go
+++ b/cmd/platform/server.go
@@ -36,6 +36,8 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
return err
}
+ utils.CfgDisableConfigWatch, _ = cmd.Flags().GetBool("disableconfigwatch")
+
runServer(config)
return nil
}