Created
November 21, 2016 07:58
-
-
Save Steffo99/f4c8de387cecdda810c2bf3ea00e5695 to your computer and use it in GitHub Desktop.
Avvia tutte le applicazioni specificate
This file contains hidden or 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
| #!/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