Skip to content

Instantly share code, notes, and snippets.

@tvorogme
Created August 7, 2018 10:48
Show Gist options
  • Save tvorogme/9374e0e8b32f77b650aba37806ed6c86 to your computer and use it in GitHub Desktop.
Save tvorogme/9374e0e8b32f77b650aba37806ed6c86 to your computer and use it in GitHub Desktop.
#!/bin/bash
if screen -ls | grep $SCREEN_NAME
then
screen -X -S $SCREEN_NAME quit
else
echo "Session doesn't exist, going on..."
fi
screen -dmS $SCREEN_NAME
screen -S $SCREEN_NAME -X -X stuff 'python app.py'`echo -ne '\015'`
@tvorogme
Copy link
Author

tvorogme commented Aug 7, 2018

Run python application in screen. Kill another screen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment