Add command, query, stable server with argument parsing
This commit is contained in:
13
command
Executable file
13
command
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
array_shift($argv);
|
||||
if (count($argv) === 0) {
|
||||
print('Command needs at least one argument' . PHP_EOL);
|
||||
die(1);
|
||||
}
|
||||
|
||||
$context = new ZMQContext();
|
||||
$socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH);
|
||||
$socket->connect('ipc:///tmp/storage_server_command.ipc');
|
||||
$socket->sendmulti($argv);
|
||||
Reference in New Issue
Block a user