Merge pull request #487 from FoolHen/port-param-fix

Fix pipedald port parameter
This commit is contained in:
Robin Davies
2026-06-01 15:35:41 -04:00
committed by GitHub
2 changed files with 11 additions and 3 deletions
+8
View File
@@ -74,9 +74,17 @@ public:
bool LogHttpRequests() const { return this->logHttpRequests_; }
void SetSocketServerEndpoint(const std::string &endpoint)
{
if (endpoint.find(':') == std::string::npos)
{
// Only a port number was provided, use default address.
this->socketServerAddress_ = "0.0.0.0:" + endpoint;
}
else
{
this->socketServerAddress_ = endpoint;
}
}
bool GetAccessPointGateway(boost::asio::ip::network_v4 *pGatewayNetwork) const {
if (this->accessPointGateway_.length() == 0) return false;
+2 -2
View File
@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
}
if (parser.Arguments().size() == 0)
{
throw PiPedalException("<config_root> not provided.");
throw PiPedalException("<doc_root> not provided.");
}
if (help || parser.Arguments().size() == 0)
{
@@ -225,7 +225,7 @@ int main(int argc, char *argv[])
<< "Options:\n"
<< " -systemd: Log to systemd journals instead of to the console.\n"
<< " -port: Port to listen on e.g. 80, or 0.0.0.0:80\n"
<< " -log-level: (debug|info|warning|error)"
<< " -log-level: (debug|info|warning|error)\n"
<< "Example:\n"
<< " pipedald /etc/pipedal/config /etc/pipedal/react -port 80 \n"
"\n"