Skip to content

Instantly share code, notes, and snippets.

@Ian-FR
Created October 5, 2020 01:53
Show Gist options
  • Save Ian-FR/35c24e72f9e2b7280bb28014b585284f to your computer and use it in GitHub Desktop.
Save Ian-FR/35c24e72f9e2b7280bb28014b585284f to your computer and use it in GitHub Desktop.
script to start web server quickly
sudo service php7.4-fpm start
status=$1
cols=$(($COLUMNS - 29))
red=$(tput setaf 1)
normal=$(tput sgr0)
if [[ $status -eq 0 ]]; then
printf " * Starting php7.4-fpm\033[%dC[ OK ]\n" $(($cols))
else
printf " * Starting php7.4-fpm\033[%dC[${red}fail${normal}]\n" $(($cols))
fi
sudo service postgresql start
sudo service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment