shoutrrr icon indicating copy to clipboard operation
shoutrrr copied to clipboard

Support custom script

Open giggio opened this issue 2 years ago • 4 comments

It would be nice to have shoutrrr simply call a custom script and pass the arguments. We could extend then it as we needed.

giggio avatar Nov 13 '23 23:11 giggio

Shoutrrr is a go library, so we have no idea what the running environment is like. It also feels like a potential security issue that the consumers of the library would need to handle.

piksel avatar Nov 14 '23 07:11 piksel

Shoutrrr doesn't need to know the environment, the user is supposed to know what they want to call.

I'll explain my context. I'm using Shoutrrr with Watchtower, and I need to know when an update is available and take some custom actions. Because I can't do that, I can't use Watchtower. I'm moving to Diun, as they support custom scripts, see: https://crazymax.dev/diun/notif/script/

Regarding security, the script would have as much privilege as the process running Shoutrrr, if that is compromised, I'd say the risk is much greater than starting a process.

giggio avatar Nov 14 '23 15:11 giggio

Watchtower is running inside a container with no additional binaries, so there is nothing to run your script in. No bash, no python, nothing. That's what I meant by "the environment".

Diun seems to be much more suitable for your usage though, as it's main usage scenario is watching for docker image updates.

piksel avatar Nov 14 '23 16:11 piksel

I could volume mount what I need.

giggio avatar Nov 14 '23 17:11 giggio