Last active
October 10, 2021 23:58
-
-
Save markcerv/7ba608b69bf6edf57db456187ad8a4ff to your computer and use it in GitHub Desktop.
.mrc_boot_script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If we made it in here, then that's a good thingg | |
read -r -t 15 -p "Run the only on boot commands? [y/N] " response | |
response=${response,,} # tolower | |
if [[ "$response" =~ ^(yes|y)$ ]] | |
then | |
echo "All of these commands need sudo, so be prepared to enter in a password" | |
sleep 2 | |
#Need to do this to get screens running cleanly | |
echo "Screen cleanup" | |
sudo /etc/init.d/screen-cleanup start | |
#Let's also make sure postgres is running | |
echo "Fire up postgresql" | |
sudo service postgresql start | |
#Let's also make sure mysql is running | |
echo "Fire up mysql" | |
sudo service mysql start | |
#Let's also make sure ssh is running | |
echo "Fire up ssh" | |
sudo service ssh --full-restart | |
#Let's also make sure redis is running (for celery) | |
echo "Fire up redis-server" | |
sudo service redis-server start | |
else | |
echo "Doing nothing" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment