-
Notifications
You must be signed in to change notification settings - Fork 351
Description
With 8.5.2 docker image linux/amd64 (sha256:7434f3a6c9cbe2a69b5653d671965c24ed527bbab2301a3e0f8b7d32f5650fbe) it seems that command line arguments are ignored.
Tested with --norestart and --advertiseaddr.
Log says:
Starting Logitech Media Server on port 9000...
Using additional arguments: "--advertiseaddr 192.168.1.77 --nomysqueezebox --norestart"
No errors in any log.
But when logging values in Perl, then these are empty, although variables are accessed as done in other places.
(tested why main::canRestartServer() in slimserver.pl didn't deny restarts although --norestart was specified)
sub canRestartServer {
my $result;
$result = $::norestart;
logWarning("norestart is $result");
$result = $main::advertiseaddr;
logWarning("advertiseaddr is $result");
$result = $main::httpaddr;
logWarning("httpaddr is $result");
$result = Slim::Utils::Network::hostAddr();
logWarning("hostAddr() is $result");
...
Result:
[24-06-04 22:56:42.6352] main::canRestartServer (1129) Warning: norestart is
[24-06-04 22:56:42.6354] main::canRestartServer (1131) Warning: advertiseaddr is
[24-06-04 22:56:42.6355] main::canRestartServer (1133) Warning: httpaddr is
[24-06-04 22:56:42.6356] main::canRestartServer (1135) Warning: hostAddr() is 172.19.0.2
Removed outdated --nomysqueezebox , tested again, but got same result.
Did I find a bug, or do I get something wrong?
Kind regards
Maddes
[Update/Solution]
EXTRA_ARGS in Docker configuration had enclosing quotes, which lead to the wrong parametes.
Note for myself (and others): do not quote EXTRA_ARGS in your docker config (compose.yaml, etc.)
P.S.:
While reading Perl 5.31 docs I recognized that our only creates aliases to existing variables, which I couldn't find in the source. And GetOptions() seems to need existing variables. Do not know if this could be the cause.
Not an Perl expert.