Xampp for Linux start/stop script

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Xampp for Linux start/stop script

Postby dither » 07. January 2011 00:48

A few months ago I've swithced from windows Xampp to Ubuntu maverick meerkat with Lampp. Since I'm a newbie in linux platform, the first thing I've missed was the Xampp start/stop taskbar application. So I've made a small script to perform the same task. In case someone needs it, I'm posting the script bellow. Any suggestions or improvements are welcome.

Open your favorite text editor and paste the following code.
Save the file on your desktop as “Lampp.sh”.
Right click the “Lampp.sh” file and select “Properties”, then go to “Permissions” tab and tick the “allow executing file as program” and close (or Open a terminal, then “cd” to your Desktop directory and type “chmod +x Lampp.sh”).
Double click the “Lampp.sh” file, then select “Run in terminal” and follow the script's instructions.

Code: Select all
echo "Hello, "$USER" ! This is the current Lampp status:"
sudo /opt/lampp/lampp status;
menu () {
while true; do
echo "Please select LAMPP option and press [ENTER] or [q to Quit]:"
echo "s.                      Lampp Status.";
echo "1.  (start)      Start XAMPP.";
echo "2.  (stop)      Stop XAMPP.";
echo "3.  (restart)      Stop and start LAMPP.";
echo "4.  (startapache)   Start only the Apache.";
echo "5.  (stopapache)   Stop the Apache.";
echo "6.  (startmysql)   Start only the MySQL database.";
echo "7.  (stopmysql)           Stop the MySQL database.";
echo "8.  (startssl)           Activate the SSL support";
echo "9.  (stopssl)      Stop the Apache SSL support.";
echo "10. (startftp)           Start the ProFTPD server.";
echo "11. (stopftp)      Stop the ProFTPD server.";
echo "12. (security)           Start a small security check programm.";
echo "Select an option: ";
read option;
echo "You selected option: "$option;
case "$option" in
's') sudo /opt/lampp/lampp status;;
'q') echo " exiting ..."; sleep 1; exit;;
'1') sudo /opt/lampp/lampp start;;
'2') sudo /opt/lampp/lampp stop;;
'3') sudo /opt/lampp/lampp restart;;
'4') sudo /opt/lampp/lampp startapache;;
'5') sudo /opt/lampp/lampp stopapache;;
'6') sudo /opt/lampp/lampp startmysql;;
'7') sudo /opt/lampp/lampp stopmysql;;
'8') sudo /opt/lampp/lampp startssl;;
'9') sudo /opt/lampp/lampp stopssl;;
'10') sudo /opt/lampp/lampp startftp;;
'11') sudo /opt/lampp/lampp stopftp;;
'12') sudo /opt/lampp/lampp security;;
* ) echo "\"$option\" is not an option, please try again...";;
Posts: 1
Joined: 07. January 2011 00:13

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests