Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBus: change openvpn extension from ovpn to conf #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/rsu-connector/UBus/UBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ Command::IVPNActor::ConnectionStatusVPN Ubus::UbusImpl::StartVPN( const std::str
{
std::string filename{ "/etc/openvpn/" };
filename.append( name );
filename.append( ".ovpn" );
filename.append( ".conf" );

struct stat buffer;
if ( stat( filename.c_str(), &buffer ) != 0 )
Expand Down Expand Up @@ -589,7 +589,7 @@ Command::IVPNActor::ConnectionStatusVPN Ubus::UbusImpl::StopVPN( const std::stri
{
std::string filename{ "/etc/openvpn/" };
filename.append( name );
filename.append( ".ovpn" );
filename.append( ".conf" );

struct stat buffer;
if ( stat( filename.c_str(), &buffer ) != 0 )
Expand Down Expand Up @@ -632,7 +632,7 @@ bool Ubus::UbusImpl::ConfigureVPN( const std::string& name, const std::string& c
{
std::string filename{ "/etc/openvpn/" };
filename.append( name );
filename.append( ".ovpn" );
filename.append( ".conf" );

std::ofstream f( filename );
if ( !f.good() )
Expand All @@ -654,7 +654,7 @@ bool Ubus::UbusImpl::GetVPNConfigurations( std::vector<VPNConfiguration>& config
for ( const auto& entry : std::experimental::filesystem::directory_iterator( directoryName ) )
{
auto path = entry.path();
if ( path.extension() == ".ovpn" )
if ( path.extension() == ".conf" )
{
auto name = path.stem();
auto status = IsVpnRunning( name );
Expand Down