Stopping bitcoind is done by sending a signal to the daemon. I don't know how good bitcoind tries to close its databases, but I've had once a database corruption when killing the daemon. On the bitcoin chat people advised me to to send the rpc stop command to stop it (and call start-stop-daemon later again to clean it up), checking the debug log can give some information if it is closing right (flushing the database files). Best would be that bitcoind closes itself properly after receiving a kill signal.
How can I implement this to the skript?