Merge branch 'dev' of github.com:amnezia-vpn/desktop-client into Linux_deploy_script
This commit is contained in:
commit
4769a67936
3 changed files with 24 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "amnezia_application.h"
|
#include "amnezia_application.h"
|
||||||
|
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
|
@ -49,6 +50,24 @@
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
setQuitOnLastWindowClosed(false);
|
setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
|
// Fix config file permissions
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
{
|
||||||
|
QSettings s(ORGANIZATION_NAME, APPLICATION_NAME);
|
||||||
|
s.setValue("permFixed", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString configLoc1 = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/"
|
||||||
|
+ ORGANIZATION_NAME + "/" + APPLICATION_NAME + ".conf";
|
||||||
|
QFile::setPermissions(configLoc1, QFileDevice::ReadOwner | QFileDevice::WriteOwner);
|
||||||
|
|
||||||
|
QString configLoc2 = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/"
|
||||||
|
+ ORGANIZATION_NAME + "/" + APPLICATION_NAME + "/" + APPLICATION_NAME + ".conf";
|
||||||
|
QFile::setPermissions(configLoc2, QFileDevice::ReadOwner | QFileDevice::WriteOwner);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
m_settings = std::shared_ptr<Settings>(new Settings);
|
m_settings = std::shared_ptr<Settings>(new Settings);
|
||||||
m_serverController = std::shared_ptr<ServerController>(new ServerController(m_settings, this));
|
m_serverController = std::shared_ptr<ServerController>(new ServerController(m_settings, this));
|
||||||
m_configurator = std::shared_ptr<VpnConfigurator>(new VpnConfigurator(m_settings, m_serverController, this));
|
m_configurator = std::shared_ptr<VpnConfigurator>(new VpnConfigurator(m_settings, m_serverController, this));
|
||||||
|
|
|
@ -162,7 +162,10 @@ QByteArray SecureQSettings::decryptText(const QByteArray& ba) const
|
||||||
|
|
||||||
bool SecureQSettings::encryptionRequired() const
|
bool SecureQSettings::encryptionRequired() const
|
||||||
{
|
{
|
||||||
// TODO: review on linux
|
#ifdef Q_OS_LINUX
|
||||||
|
// QtKeyChain failing on Linux
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=1
|
RestartSec=1
|
||||||
ExecStart=/opt/AmneziaVPN/service/AmneziaVPN-service.sh
|
ExecStart=/opt/AmneziaVPN/service/AmneziaVPN-service.sh
|
||||||
|
Environment=LD_LIBRARY_PATH=/opt/AmneziaVPN/client/lib
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue