diff --git a/application/clicommands/ImportCommand.php b/application/clicommands/ImportCommand.php new file mode 100644 index 00000000..e81c9934 --- /dev/null +++ b/application/clicommands/ImportCommand.php @@ -0,0 +1,54 @@ +db()); + $export->unserializeImportSources(json_decode($json)); + } + + /** + * Import SyncRule definitions + * + * Use this command to import .... + * + * USAGE + * + * icingacli director syncrule export [options] + * + * OPTIONS + * + * --no-pretty JSON is pretty-printed per default + * Use this flag to enforce unformatted JSON + */ + public function syncruleAction() + { + $json = file_get_contents('php://stdin'); + $export = new ImportExport($this->db()); + $export->unserializeSyncRules(json_decode($json)); + } +}