This is the code which I have used, slightly adapted, and it works!
http://www.instructables.com/id/Raspberry-Pi-Shutdown-Button/
Making fun of every situation..!
This is the code which I have used, slightly adapted, and it works!
http://www.instructables.com/id/Raspberry-Pi-Shutdown-Button/