This script is not impressive at all, no offence--and not only that, you have set up some dangerous permissions as well.
All you did was basically copy whatever they had on the XAMPP site's instructions, pasted it in a blank file and made it a script.
What WOULD make it more impressive is if you gave users more control over their XAMPP. Something including Zenity ("man zenity" in terminal) and a few toggle (radio button) switches that would start/stop/restart XAMPP. Basically, a GUI script.
But this script? It's not good enough, you need to put more effort into it. Learn some more BASH scripting--there's tons of free pdfs for that.
Also, I have a problem with "chmod 777 -R /opt/lampp/htdocs" someone with physical access to your computer can delete everything.
- Code: Select all
#!/usr/bin/sh
#Script to install Xampp in your Linux System
####################################################
# #
# freshtutorial.com #
# #
# #
####################################################
#Download XAMPP
wget -O xampp-linux-1.8.0.tar.gz http://sourceforge.net/projects/xampp/files/BETAS/xampp-linux-1.8.0.tar.gz/download
#Extract XAMPP in /opt
tar xvzf xampp-linux-1.8.0.tar.gz -C /opt
#Change the perission of htdocs
chmod 777 -R /opt/lampp/htdocs