Need help with a bash script


hawihoney

Recommended Posts

I'm using this XMLRPC-Client to send "Start/Stop downloads" commands from Tautulli to another Unraid docker container:

 

https://gist.github.com/bjoern-r/c3afda16d45edad5f4a5

 

The last two lines of this script look like this:

curl -k $verbose --data "@$rpcxml" "$servUrl" 2>/dev/null | xmllint --format -
\rm -f $rpcxml

xmllint is not part of Unraid so I removed the pipe:

curl -k $verbose --data "@$rpcxml" "$servUrl" 2>/dev/null
\rm -f $rpcxml

I was under the impression, that "\rm $rpcxml" would remove the temporary xml file in $rpcxml. That does not work. Every RPC request leaves the temp file in the directory.

 

Any help is highly appreciated.

 

Edited by hawihoney
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.