Skip to content

Instantly share code, notes, and snippets.

@Steffo99
Created November 21, 2016 07:58
Show Gist options
  • Select an option

  • Save Steffo99/f4c8de387cecdda810c2bf3ea00e5695 to your computer and use it in GitHub Desktop.

Select an option

Save Steffo99/f4c8de387cecdda810c2bf3ea00e5695 to your computer and use it in GitHub Desktop.
Avvia tutte le applicazioni specificate
#!/bin/bash
if [ $# -lt 1 ]; then
apps="bot hs levels mifia music"
else
apps=$1
fi
result=0
for app in $apps; do
echo "Entering $app directory"
cd "/royal/$app"
if [ ! $? ]; then
echo "Directory does not exist, skipping..."
result=1
continue
fi
echo "Pulling updates from git for $app"
git pull
if [ ! $? ]; then
echo "Update error: returned $?"
result=1
fi
echo "Opening $app"
screen -S $app -d -m ./run.sh
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment