remove unused code
add restart nginx
fix bugs