diff --git a/.vscode/launch.json b/.vscode/launch.json
index 5cf3812..933fc9a 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -223,7 +223,8 @@
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": [
- "--uninstall"
+ "--get-current-port"
+ // "--uninstall"
//"--enable-p2p" , "--nopkexec"
//,"CA", "PiPedalTest","12345678","1"
],
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e99959..1b8f4a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.16.0)
project(pipedal
- VERSION 1.1.22
+ VERSION 1.1.23
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
)
-set (DISPLAY_VERSION "v1.1.22")
+set (DISPLAY_VERSION "v1.1.23")
set (CMAKE_INSTALL_PREFIX "/usr/")
diff --git a/README.md b/README.md
index 6ffb066..10b0f29 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@

-Download: v1.1.22
+Download: v1.1.23
Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
diff --git a/debian/control b/debian/control
index 82fa263..fd37fea 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,6 @@ Package: pipedal
Pre-Depends: hostapd;authbind;dnsmasq
Priority: optional
Section: sound
-Version: 1.1.22
+Version: 1.1.23
Installed-Size: 15147
diff --git a/docs/Installing.md b/docs/Installing.md
index 2e578e3..5992f20 100644
--- a/docs/Installing.md
+++ b/docs/Installing.md
@@ -13,14 +13,14 @@ page_icon: img/Install4.jpg
Download the most recent Debian (.deb) package for your platform:
-- [Ubuntu/Raspberry Pi OS (64-bit) v1.1.22](https://github.com/rerdavies/pipedal/releases/download/v1.1.22/pipedal_1.1.22_arm64.deb)
+- [Ubuntu/Raspberry Pi OS (64-bit) v1.1.23](https://github.com/rerdavies/pipedal/releases/download/v1.1.23/pipedal_1.1.23_arm64.deb)
Install the package by running
```
sudo apt update
cd ~/Downloads
- sudo apt-get install ./pipedal_1.1.22_arm64.deb
+ sudo apt-get install ./pipedal_1.1.23_arm64.deb
```
On Raspberry Pi OS, if you have a graphical desktop installed, you can also install the package by double-clicking on the downloaded package in the File Manager.
diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md
index a4362b7..bcfb76d 100644
--- a/docs/ReleaseNotes.md
+++ b/docs/ReleaseNotes.md
@@ -1,6 +1,6 @@
# Release Notes
-## PiPedal 1.1.22
+## PiPedal 1.1.23
Features:
diff --git a/docs/download.md b/docs/download.md
index cbeafe1..166aca9 100644
--- a/docs/download.md
+++ b/docs/download.md
@@ -4,14 +4,14 @@
Download the most recent Debian (.deb) package for your platform:
-- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v1.1.22/pipedal_1.1.22_arm64.deb) v1.1.22
+- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v1.1.23/pipedal_1.1.23_arm64.deb) v1.1.23
Install the package by running
```
sudo apt update
cd ~/Downloads
- sudo apt-get install ./pipedal_1.1.22_arm64.deb
+ sudo apt-get install ./pipedal_1.1.23_arm64.deb
```
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
diff --git a/docs/index.md b/docs/index.md
index fdcdb6e..ec4ecb7 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,7 +1,7 @@
-v1.1.22
+v1.1.23
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.0 b/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.0
index ea4cf49..4fc60cd 120000
--- a/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.0
+++ b/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.0
@@ -1 +1 @@
-ToobAmp.so.1.0.11
\ No newline at end of file
+ToobAmp.so.1.0.12
\ No newline at end of file
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.11 b/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.11
deleted file mode 100644
index 9319a60..0000000
Binary files a/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.11 and /dev/null differ
diff --git a/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.12 b/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.12
new file mode 100644
index 0000000..30fcfe6
Binary files /dev/null and b/lv2/aarch64/ToobAmp.lv2/ToobAmp.so.1.0.12 differ
diff --git a/src/ConfigMain.cpp b/src/ConfigMain.cpp
index e1bcba4..1cb8d6c 100644
--- a/src/ConfigMain.cpp
+++ b/src/ConfigMain.cpp
@@ -781,6 +781,49 @@ void Install(const std::filesystem::path &programPrefix, const std::string endpo
<< "\n";
}
+static std::string GetCurrentWebServicePort()
+{
+ std::filesystem::path servicePath = GetServiceFileName(NATIVE_SERVICE);
+ try
+ {
+ if (std::filesystem::exists(servicePath))
+ {
+ {
+ ifstream f(servicePath);
+ if (!f.is_open())
+ {
+ throw PiPedalException(SS("Can't open " << servicePath));
+ }
+ while (true)
+ {
+ std::string line;
+ if (f.eof())
+ break;
+ std::getline(f, line);
+ if (line.starts_with("ExecStart="))
+ {
+ auto startPos = line.find("-port ");
+ if (startPos != std::string::npos)
+ {
+ startPos = startPos+6;
+ auto endPos = line.find(" -systemd");
+ if (endPos != std::string::npos)
+ {
+ std::string result = line.substr(startPos,endPos-startPos);
+ return result;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ catch (const std::exception &/*ignored*/)
+ {
+ }
+ return "";
+}
+
static void PrintHelp()
{
PrettyPrinter pp;
@@ -930,6 +973,7 @@ int main(int argc, char **argv)
bool enable = false, disable = false, restart = false;
bool enable_ap = false, disable_ap = false;
bool enable_p2p = false, disable_p2p = false;
+ bool get_current_port = false;
bool nopkexec = false;
bool excludeShutdownService = false;
std::string prefixOption;
@@ -952,19 +996,25 @@ int main(int argc, char **argv)
parser.AddOption("--enable-p2p", &enable_p2p);
parser.AddOption("--disable-p2p", &disable_p2p);
+ parser.AddOption("--get-current-port", &get_current_port); // private. For debug use only.
+
parser.AddOption("--excludeShutdownService", &excludeShutdownService); // private (unstable) option used by shutdown service.
try
{
parser.Parse(argc, (const char **)argv);
- int actionCount = install + uninstall + stop + start + enable + disable + enable_ap + disable_ap + restart + enable_p2p + disable_p2p;
+ int actionCount = get_current_port + install + uninstall + stop + start + enable + disable + enable_ap + disable_ap + restart + enable_p2p + disable_p2p;
if (actionCount > 1)
{
throw PiPedalException("Please provide only one action.");
}
- if (actionCount == 0)
+ if (argc == 1 )
{
help = true;
+ } else if (actionCount == 0)
+ {
+
+ throw PiPedalException("No action provided.");
}
if ((!enable_p2p) && (!enable_ap))
{
@@ -992,6 +1042,11 @@ int main(int argc, char **argv)
PrintHelp();
return EXIT_SUCCESS;
}
+ if (get_current_port)
+ {
+ std::cout << "current port: " << GetCurrentWebServicePort() << std::endl;
+ return 0;
+ }
if (portOption.size() != 0 && !install)
{
cout << "Error: -port option can only be specified with the -install option."
@@ -1044,7 +1099,11 @@ int main(int argc, char **argv)
if (portOption == "")
{
- portOption = "80";
+ portOption = GetCurrentWebServicePort();
+ if (portOption == "")
+ {
+ portOption = "80";
+ }
}
if (portOption.find(':') == string::npos)
{