you can also initialte any root activity at startup using the following method. I used it to start the XAMPP server.
1) Navigate to /etc/init.d eg ‘cd /etc/init.d/’
2) Create a new file with nano eg ‘nano’
3) Put the following into the file
4) Give execution permission to the file eg ‘chmod +x lampp’
5) Check this by typing ‘ls -l lampp’ , the filename should be green if it worked
6) now use the following command to add it to startup runlevels ‘update-rc.d -f lampp defaults’
That is what I did and it worked. You could always create a file to stop XAMPP on shutdown. Use this same method above but in the file put ‘stop’ in replace of ‘start’. Then use sysv-rc-conf to make it only run in levels 0 & 6.