|
|
@ -5,11 +5,14 @@ STATUS=$($LAMPP status 2> /dev/null) |
|
|
|
|
|
|
|
|
|
|
|
APACHE=$(echo "$STATUS" | grep -i apache | grep -io not > /dev/null && echo "down" || echo "up") |
|
|
|
APACHE=$(echo "$STATUS" | grep -i apache | grep -io not > /dev/null && echo "down" || echo "up") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
COLOUR="" |
|
|
|
|
|
|
|
|
|
|
|
function toggleApache(){ |
|
|
|
function toggleApache(){ |
|
|
|
if [ $APACHE = "up" ]; then |
|
|
|
if [ $APACHE = "up" ]; then |
|
|
|
gksudo $LAMPP stopapache |
|
|
|
gksudo $LAMPP stopapache > /dev/null |
|
|
|
else |
|
|
|
else |
|
|
|
gksudo $LAMPP startapache |
|
|
|
gksudo $LAMPP startapache > /dev/null |
|
|
|
|
|
|
|
COLOUR="#FF8000" |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -26,10 +29,12 @@ case $BLOCK_BUTTON in |
|
|
|
3) toggleAll ;; |
|
|
|
3) toggleAll ;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
if [ "$APACHE" = "up" ]; then |
|
|
|
if [ -z "$COLOUR" ]; then |
|
|
|
COLOUR="#00FF00" |
|
|
|
if [ "$APACHE" = "up" ]; then |
|
|
|
else |
|
|
|
COLOUR="#00FF00" |
|
|
|
COLOUR="#FF0000" |
|
|
|
else |
|
|
|
|
|
|
|
COLOUR="#FF0000" |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo "Apache" |
|
|
|
echo "Apache" |
|
|
|