Skip to content

Instantly share code, notes, and snippets.

@NoNamePro0
Last active June 1, 2020 06:58
Show Gist options
  • Select an option

  • Save NoNamePro0/a5c70e8efbaa83f882720a84a541e3dc to your computer and use it in GitHub Desktop.

Select an option

Save NoNamePro0/a5c70e8efbaa83f882720a84a541e3dc to your computer and use it in GitHub Desktop.
Run a command in the background witch automatically rerun
#!/bin/bash
if [[ $1 == "--non-background" ]]
then
yourCommand
sleep 120
./start.sh
exit
else
screen -AmdS yourName ./start.sh --non-background
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment