Starts up monitoring of the configuration for changes.
485969
private void monitorForChanges() {
        if (monitorRunning) {
            return;
        }

        final Path path;
        try {
            path = Paths.get(configPath);
        } catch (final Exception e) {
            LOGGER.warn("Cannot monitor configuration {}, disabling monitoring; {}", configPath, e.getMessage());
            return;
        }

        if (!path.toFile().exists()) {
            LOGGER.debug("Configuration {} does not exist, disabling monitoring", configPath);
            return;
        }
        final Path directoryPath = path.getParent();

        try {
            final WatchService watchService = FileSystems.getDefault().newWatchService();
            directoryPath.register(watchService, ENTRY_MODIFY);

            monitorThread = new Thread(new Runnable() {

                @Override
                public void run() {
                    try {
                        for (;;) {
                            final WatchKey key;
                            try {
                                key = watchService.take();
                            } catch (final InterruptedException e) {
                                LOGGER.debug("Interrupted the configuration monitor thread.");
                                break;
                            }

                            for (final WatchEvent<?> event : key.pollEvents()) {
                                final WatchEvent.Kind<?> kind = event.kind();
                                if (kind == OVERFLOW) {
                                    continue;
                                }

                                // If the configuration file triggered this event, reload it
                                final Path changed = (Path) event.context();
                                if (changed.equals(path.getFileName())) {
                                    LOGGER.info(
                                            "Configuration {} has been updated, reloading.",
                                            path);
                                    try {
                                        loadConfiguration();
                                    } catch (final IOException e) {
                                        LOGGER.error("Failed to reload configuration {}", configPath, e);
                                    }
                                }

                                // reset the key
                                final boolean valid = key.reset();
                                if (!valid) {
                                    LOGGER.debug("Monitor of {} is no longer valid", path);
                                    break;
                                }
                            }
                        }
                    } finally {
                        try {
                            watchService.close();
                        } catch (final IOException e) {
                            LOGGER.error("Failed to stop configuration monitor", e);
                        }
                    }
                    monitorRunning = false;
                }
            });
        } catch (final IOException e) {
            LOGGER.error("Failed to start configuration monitor", e);
        }

        monitorThread.start();
        monitorRunning = true;
    }
40211
private void startFolderMonitor() {
    if (serverConfiguration.getAppFolderToMonitor() != null) {
      try {
        folderMonitor = new FolderMonitor(this, serverConfiguration);
        folderMonitor.start();
      } catch (IOException e) {
        log.warning("Could not monitor the given folder: "
            + serverConfiguration.getAppFolderToMonitor());
      }
    }
  }
519144
@Override
    public void processConfigurationChanges() {
        // The monitor ID is used to determine who is called to process file events.
        for (ServiceReference<FileMonitor> fm : fileMonitors.keySet()) {
            String monitorId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_IDENTIFICATION_NAME);
            if (monitorId != null && monitorId.equals("com.ibm.ws.kernel.monitor.config")) {
                fileMonitors.get(fm).processFileRefresh(false, null);
            }
        }
    }
1135380
public void startWatching() {
        try {
            final List<MonitorLine> lines = getSource().getLastLine(getInitialCount());
            actual = null;
            updateLines(lines);
        } catch (Exception e) {
            notifyObservers(e);
        }
    }
1193310
public void start()
	{
	  mThread = new Thread(mom);
	  mThread.setName("MonitorThead for " + si.getServerConnection().getUrl());
	  mThread.start();
	}
139047
private static void startAll()
    {
        try
        {
            if (_configs!=null)
            {
                synchronized(_configs)
                {
                    for(int i=0;i<_servers.size();i++)
                    {
                        HttpServer server = (HttpServer)_servers.get(i);
                        if (!server.isStarted())
                            server.start();
                    }
                }
            }
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
        }
    }
1306382
private function onConfigLoaded()
    {
        $this->log('controller config loaded/updated');
        $this->stopPlugins();
        if (!$this->state['config']['enabled']) {
            $this->log('controller disabled');
            return;
        }

        foreach ($this->state['config']['plugins'] as $pluginId => $config) {
            if (!$config['enabled']) {
                continue;
            }

            $this->log('loading plugin '.$pluginId);

            foreach ($this->registeredPlugins as $className) {
                if ($className::getPluginId() == $pluginId) {
                    $plugin = new $className($this);
                    $this->plugins[] = $plugin;
                    $plugin->init();
                    continue 2;
                }
            }

            $this->log("plugin ${pluginId} is not registered with the controller");
        }
    }
643484
public void start(JBakeConfiguration config) {
        try {
            FileSystemManager fsMan = VFS.getManager();
            FileObject listenPath = fsMan.resolveFile(config.getContentFolder().toURI());
            FileObject templateListenPath = fsMan.resolveFile(config.getTemplateFolder().toURI());
            FileObject assetPath = fsMan.resolveFile(config.getAssetFolder().toURI());

            logger.info("Watching for (content, template, asset) changes in [{}]", config.getSourceFolder().getPath());
            DefaultFileMonitor monitor = new DefaultFileMonitor(new CustomFSChangeListener(config));
            monitor.setRecursive(true);
            monitor.addFile(listenPath);
            monitor.addFile(templateListenPath);
            monitor.addFile(assetPath);
            monitor.start();
        } catch (FileSystemException e) {
            logger.error("Problems watching filesystem changes", e);
        }
    }
1008544
public final void start() {
    if (this.started) {
      log.warn(String.format("Reporter %s has already been started.", this.name));
      return;
    }
    try {
      startImpl();
      this.started = true;
    } catch (Exception exception) {
      log.warn(String.format("Reporter %s did not start correctly.", this.name), exception);
    }
  }
1047262
public void refresh(ApplicationMonitorConfig config) {

        _config.set(config);

        UpdateTrigger trigger = config.getUpdateTrigger();

        if (trigger != UpdateTrigger.DISABLED) {
            // Start all existing listeners
            for (ApplicationListeners listeners : _appListeners.values()) {
                listeners.startListeners(config.getPollingRate(), config.getUpdateTrigger() == UpdateTrigger.MBEAN);
            }
        } else {
            // Stop all existing listeners
            for (ApplicationListeners listeners : _appListeners.values()) {
                listeners.stopListeners(false);
            }
        }
    }
796974
def on_config_value_changed(self, config_m, prop_name, info):
        
        config_key = info['args'][1]

        if config_key in ["EXECUTION_TICKER_ENABLED"]:
            self.check_configuration()
825190
def reload_configuration(self, event):
        """"""

        if event.target == self.uniquename:
            self.log('Reloading configuration')
            self._read_config()
651031
function main(onStart) {
    const conf = config.read();

    initLogging(conf);
    initFsStorage(conf);

    logger.debug('Default configuration file: %s', conf.path);
    logger.debug('Configuration parameters: %s', JSON.stringify(conf));

    runWebServer(conf, onStart);
}
794533
public static function start() : void
  {
    $required = Config::$environment;
    $dotenv   = new Dotenv(Config::$root);

    $dotenv->overload();
    $dotenv->required($required);
  }
85476
function _startWatchdog() {
    if (!watcher) {
      var watcherOptions = { persistent: !!options.persistent };
      watcher = fs.watch(folder, watcherOptions, function (event, filename) {
        if (event === 'change' && filename.charAt(0) != '.') {
          // On every change load the changed file. This will trigger notifications for interested
          // subscribers.
          _loadFile(filename);
        }
      });
    }
  }
364844
def start
     if File.exist? 'config.yml'
        Notifier.notify "Watching for changes to Shopify Theme"
      else
        data = <<-EOF
---
:api_key: YOUR_API_KEY
:password: YOUR_PASSWORD
:store: YOURSHOP.myshopify.com
:theme_id: 'YOUR_THEME_ID'
:ignore_files:
- README.md
- CHANGELOG.md
EOF
        File.open('./config.yml', "w") { |file| file.write data }
        Notifier.notify "Created config.yml. Remember to add your Shopify details to it."
      end
    end
90886
private static synchronized void startup() {
		
		try {
			if (CONFIG == null) {
				CONFIG = ApiConfigurations.fromProperties();
			}
			
			ObjectMapper objectMapper = new ObjectMapper();
			
			AppIdentityService appIdentityService = new AppIdentityService(CONFIG, objectMapper, true);

			MetricMonitorService monitorService = new MetricMonitorService(CONFIG, objectMapper, appIdentityService);
			
			MetricSender sender = new MetricSender(CONFIG, objectMapper, monitorService);
			
			BACKGROUND_SERVICE = new MetricBackgroundService(COLLECTOR, sender);
			BACKGROUND_SERVICE.start();
			
		} catch (Throwable t) {
			LOGGER.error("Exception starting Stackify Metrics API service", t);
		}
	}