#!/bin/bash
echo "Content-type: text/html"
echo ""
echo '<html>'
echo '<head>'
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
PATH="/bin:/usr/bin:/usr/ucb:/usr/opt/bin"
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