Answers for "automate apache2 mysql start wsl2"

0

automate apache2 mysql start wsl2

## Start apache2 if not running
status=`service apache2 status`
if [[ $status == *"apache2 is not running" ]]
then
sudo service apache2 start
fi
## Start MySQL if is stopped
status=`service mysql status`
if [[ $status == *"MySQL is stopped." ]]
then
sudo service mysql start
fi
Posted by: Guest on April-03-2022

Browse Popular Code Answers by Language