Page 1 of 1
Changing log folder on Linux - specify log, config, PID directories
Posted: Mon Nov 04, 2024 6:25 pm
by ladowny
I'm running Debian 12 x86_64 GNU/Linux and trying to compile SoftEther with different than it's default log directory location
In
https://github.com/SoftEtherVPN/SoftEth ... LD_UNIX.md - Specify log, config, PID directories I read
To specify directories, perform ./configure like below.
Code: Select all
CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether" ./configure
What I'm doing is
Code: Select all
cd /usr/src
git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git
cd SoftEtherVPN_Stable/
git submodule init && git submodule update
mkdir -p /var/log/softether && mkdir -p /var/lib/softether && mkdir -p /run/softether
CMAKE_FLAGS="-DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether" ./configure
make
make install
The compilation is succesfull and vpnserver starts but the log dir and other dirs are still under /usr/vpnserver/ directory.
What am I doing wrong? How can I have the logs in /var/log ?
Re: Changing log folder on Linux - specify log, config, PID directories
Posted: Mon Nov 11, 2024 7:24 am
by Jason McLean
It looks like the CMAKE_FLAGS are not being passed properly to the ./configure script, as SoftEther’s configuration may require using cmake directly rather than ./configure to respect these flags.
You can try:
Code: Select all
# Clone the repository and initialize submodules
cd /usr/src
git clone https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git
cd SoftEtherVPN_Stable/
git submodule init && git submodule update
# Create the necessary directories
mkdir -p /var/log/softether /var/lib/softether /run/softether
# Prepare the build directory and remove any cached files
rm -rf build && mkdir build
cd build
# Run cmake with the custom directory flags
cmake -DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether ..
# Compile and install
make
make install
Regard,
Re: Changing log folder on Linux - specify log, config, PID directories
Posted: Tue Nov 12, 2024 10:27 pm
by ladowny
Thanks Jason, tried to follow your suggestion, but when I run cmake I'm getting an error
Code: Select all
$ cmake -DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether -B /usr/src/SoftEtherVPN_Stable/build -S /usr/src/SoftEtherVPN_Stable/src
CMake Error: The source directory "/usr/src/SoftEtherVPN_Stable/src" does not appear to contain CMakeLists.txt.
Could not find that file anywhere in sources. After further digging I found the file in Developer Edition (DE), Stable Edition (SE) I was using seems to be a couple of years behind. I managed to compile the Developer Edition and found a Debian package that is most likely based on it as it supports logging to /var/log and uses the same paths.
So I cloned
https://github.com/SoftEtherVPN/SoftEtherVPN.git instead of
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git and it does work.
Re: Changing log folder on Linux - specify log, config, PID directories
Posted: Wed Nov 13, 2024 8:09 am
by Jason McLean
ladowny wrote: ↑Tue Nov 12, 2024 10:27 pm
geometry dash meltdown
Thanks Jason, tried to follow your suggestion, but when I run cmake I'm getting an error
Code: Select all
$ cmake -DSE_PIDDIR=/run/softether -DSE_LOGDIR=/var/log/softether -DSE_DBDIR=/var/lib/softether -B /usr/src/SoftEtherVPN_Stable/build -S /usr/src/SoftEtherVPN_Stable/src
CMake Error: The source directory "/usr/src/SoftEtherVPN_Stable/src" does not appear to contain CMakeLists.txt.
Could not find that file anywhere in sources. After further digging I found the file in Developer Edition (DE), Stable Edition (SE) I was using seems to be a couple of years behind. I managed to compile the Developer Edition and found a Debian package that is most likely based on it as it supports logging to /var/log and uses the same paths.
So I cloned
https://github.com/SoftEtherVPN/SoftEtherVPN.git instead of
https://github.com/SoftEtherVPN/SoftEtherVPN_Stable.git and it does work.
I got it. Thank you