command = process.argv[2]; if (typeof command != "undefined") { console.log("Checking certificates..."); require('./check'); console.log("Parsing command..."); if (command == "detect") { process.argv.splice(2, 1); require('./detect'); } else if (command == "learn") { process.argv.splice(2, 1); require('./learn'); } else if (command == "auto") { process.argv.splice(2, 1); require('./auto'); } else if (command == "interactive") { process.argv.splice(2, 1); require('./interactive'); } else if (command == "status") { process.argv.splice(2, 1); require('./status'); } else { console.log("Unknown command"); process.exit(); } } else { console.log("Missing operand"); process.exit(); }