user14629: I have bitcoin daemon and I want to use the walletnotify option with a json-rpc call. Some of the examples use a "transaction.sh" file for walletnotify. What is it for?
What do I have to write in that sh file, to make walletnotify work for more than 6 confirmations.

user4241: First you must configure your bitcoin.conf file for JSON-RPC
rpcallowip=127.0.0.1
rpcuser=yourusername
rpcpassword=reallystrongpasswordthatsnothis
rpcport=7788
walletnotify=/home/scripts/transaction.sh %s

Where transaction.sh is some bash program. One approach is to have it make an http request to some process to notify you of the deposit. An example:
#!/bin/sh
curl -d "txid=$1" http://127.0.0.1/some/route

walletnotify will execute transaction.sh every time you either

receive bitcoin
send bitcoin
when a bitcoin gets its first confirmation

%s is the transaction ID or txid which gets passed to transaction.sh.

14629: <p>I have bitcoin daemon and I want to use the walletnotify option with a json-rpc call. Some of the examples use a "transaction.sh" file for <code>walletnotify</code>. What is it for?</p>

<p>What do I have to write in that sh file, to make walletnotify work for more than 6 confirmations.</p>
 4241: <p>First you must configure your <code>bitcoin.conf</code> file for JSON-RPC</p>

<pre><code>rpcallowip=127.0.0.1
rpcuser=yourusername
rpcpassword=reallystrongpasswordthatsnothis
rpcport=7788
walletnotify=/home/scripts/transaction.sh %s
</code></pre>

<p>Where <code>transaction.sh</code> is some <a href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)">bash</a> program. One approach is to have it make an <code>http</code> request to some process to notify you of the deposit. An example:</p>

<pre><code>#!/bin/sh
curl -d "txid=$1" http://127.0.0.1/some/route
</code></pre>

<p><code>walletnotify</code> will execute <code>transaction.sh</code> every time you either</p>

<ul>
<li>receive bitcoin</li>
<li>send bitcoin</li>
<li>when a bitcoin gets its first confirmation</li>
</ul>

<p><code>%s</code> is the transaction ID or <code>txid</code> which gets passed to <code>transaction.sh</code>.</p>
