Create init script.
Install init script.
Better file permissions, 777 is never an option.
Remove commented-out code.