On OpenWrt 22.03.2 when I run
/etc/init.d/simple-adblock check domain.com the
check() function in my init script receives the
domain.com as a parameter and works fine.
However if I run
service simple-adblock check domain.com the
check() function in my init script does not receive any parameters and fails.
Is there anything I can do to make it work with the
Not really, aside from extending procd accordingly:
$2 are looked at)
Using quotes to combine the remaining arguments into one single argument?
service simple-adblock "check domain.com"
Not sure if that would work, but you might try.
It won't, as it then consider the string to be executed as a single binary (with spaces in the name). Changing procd's service command/ script would need changing - or the user has to realize that OpenWrt isn't RedHat…
@slh, @hnyman, thank you gentlemen, I'll create a PR on github, hopefully someone will merge it to the main repo.