update lua script for html and restful