I was recently trying to get sabnzb to run on a port other than 8080 and after doing a bit of research I noticed that the file /run/s6/services/sabnzbd/run has a hard coded value of 8080. Any chance of changing this to use an ENV variable?
No, you can map it to whatever port you like in docker arguments
all that does is change the external port - I am looking to change the internal port so that it can match the sabnzbd.ini file settings I am using. Is there a specific reason its hard coded?
Why?. . . . . . . . .
I have a number of instances running that have a ini file that is auto generate – some are behind proxies, some are running on docker.
if your really set against allowing it to use what is in the ini file, I can take a look at updating the run file using the custom config (love how this is possible).
We have no plans to modify how the container works currently, but you are more than welcome to modify it according to your needs.
the link above can help you ensure you can continue to pull our latest updates while maintaining your custom needs.
That does not turn out to be as simple as it seems at first.
I put the following in custom-cont-init.d/test:
#!/bin/bash echo "**** CUSTOM ****" ls -alF /run/s6/services/sabnzbd/ cp /config/run-sabnzbd /run/s6/services/sabnzbd/run chmod 755 /run/s6/services/sabnzbd/run
where run-sabnzbd is just the adaptated run script to change the port.
While this seems reasonable simple, it results in the following when the container is started:
[cont-init.d] 99-custom-scripts: executing... [custom-init] files found in /config/custom-cont-init.d executing [custom-init] run-sabnzbd-without-fixed-port.sh: executing... **** CUSTOM **** ls: cannot access '/run/s6/services/sabnzbd/': No such file or directory cp: cannot create regular file '/run/s6/services/sabnzbd/run': No such file or directory chmod: cannot access '/run/s6/services/sabnzbd/run': No such file or directory [custom-init] run-sabnzbd-without-fixed-port.sh: exited 1 [cont-init.d] 99-custom-scripts: exited 0. [cont-init.d] done.
it seems that the path /run/s6/services/sabnzbd/ is not yet existing at that point of time.
Service file is in
Also, just use sed
I ended up moving everything to run behind traefik. It made maintenance easier (I didn’t want to build my own custom images and maintain them). Bit of a bummer this couldn’t be handled by an ENV variable.