Skip to content

Instantly share code, notes, and snippets.

@TheMasteredPanda
Created October 22, 2017 22:55
Show Gist options
  • Save TheMasteredPanda/1876e361e19e57630ee970bc9e8d0442 to your computer and use it in GitHub Desktop.
Save TheMasteredPanda/1876e361e19e57630ee970bc9e8d0442 to your computer and use it in GitHub Desktop.
#/bin/bash
echo "--------------------[ Starting up the following servers ] --------------------"
echo "--> proxy - BungeeCord"
echo "--> towny - PaperSpigot Server"
echo "--> dev - PaperSpigot Server"
echo "-----------------------------------------------------------------------------"
sleep 1
cd /home
for file in ./*; do
if [ -d $file ]; then
array=(${file//// })
screen -S ${array[1]} -U -d -m sh $file/*.sh
echo "$file/*.sh."
echo "Started screen for $file with the name as ${array[1]}."
fi
done
echo "----------------------------------------------------------------------------"
echo "Done."
echo "----------------------------------------------------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment