I made 2 .sh scripts to start and stop Xampp server. I'd like to merge them in a single launcher to obtain something like a ON/OFF button, so that if Xampp has already been started it would stop, but I don't know how to do that.
The code I have in my script is this:
#!/bin/bash
sudo /opt/lampp/lampp start;
echo "Starts Xampp server";
Can someone help me?
P.S. I read this answer but it doesn't help...why did Oli said "But I'll leave this up to you"? :P