moved the function of checking the availability of wireguard config to ipc client
This commit is contained in:
parent
caad670dbf
commit
8f18933713
4 changed files with 33 additions and 19 deletions
|
|
@ -21,5 +21,6 @@ class IpcInterface
|
|||
|
||||
SLOT( bool copyWireguardConfig(const QString &sourcePath) );
|
||||
SLOT( bool isWireguardRunning() );
|
||||
SLOT( bool isWireguardConfigExists(const QString &configPath) );
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include <QObject>
|
||||
#include <QDateTime>
|
||||
#include <QLocalSocket>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "router.h"
|
||||
#include "logger.h"
|
||||
|
|
@ -169,3 +170,8 @@ bool IpcServer::isWireguardRunning()
|
|||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool IpcServer::isWireguardConfigExists(const QString &configPath)
|
||||
{
|
||||
return QFileInfo::exists(configPath);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public:
|
|||
virtual void setLogsEnabled(bool enabled) override;
|
||||
virtual bool copyWireguardConfig(const QString &sourcePath) override;
|
||||
virtual bool isWireguardRunning() override;
|
||||
virtual bool isWireguardConfigExists(const QString &configPath) override;
|
||||
|
||||
private:
|
||||
int m_localpid = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue