docs: function switchState(started, pkg) {
      pkg.started = started;
  
      //add available port back into port range
      if (!started && pkg.env && pkg.env.PORT)
        ports.push(pkg.env.PORT);
  
      console.log((started ? 'Started' : 'Stopped') + ' application ' + pkg.user + '/' + pkg.name);
  
      logInfo('info', 'Application ' + (started ? 'started' : 'stopped'), {name: pkg.app, user: pkg.user});
      droneModel.createOrUpdate(pkg, function(){});
    }