Can I create chain from cgi script. When I tried I got response code 0, but chain was not created

+1 vote

echo "Content-type: text/html"
echo ""

echo '<html>'
echo '<head>'
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
export $PATH

echo '<title>Command</title>'
echo '</head>'
echo '<body>'

echo '<h3>'
echo '</h3>'
eval $(echo ${QUERY_STRING//&/;})
echo $chain_name
/usr/local/bin/multichain-util create $chain_name -datadir= ~/.multichain/
echo "Response code"
echo $?

echo '</body>'
echo '</html>'

exit 0
asked Sep 1, 2017 by Enthuchain

1 Answer

0 votes

This will be an issue in your script, which is a little beyond the scope here. But I'm guessing the $chain_name was never initialized.

answered Sep 1, 2017 by MultiChain