Introduce CLI

main: Parse args using getopt_long() in main().

Begin implementation of a CLI. It can be launched
using ./qswiki config --cli.

Allow connecting to another instance using "attach" command.
This uses Unix domain sockets, and in the future can be used
to drop caches, reload template, etc.

Closes: #21
This commit is contained in:
2021-10-03 17:03:22 +02:00
والد 1082f8ac5a
کامیت 3d0fce590b
7فایلهای تغییر یافته به همراه603 افزوده شده و 1 حذف شده

16
cliserver.h Normal file
مشاهده پرونده

@@ -0,0 +1,16 @@
#ifndef CLISERVER_H
#define CLISERVER_H
#include <thread>
#include "cli.h"
class CLIServer
{
private:
CLIHandler *handler = nullptr;
public:
CLIServer(CLIHandler &handler);
bool detachServer(std::string socketpath);
};
#endif // CLISERVER_H