Skip to content

Instantly share code, notes, and snippets.

@matthewhochler
Created April 4, 2017 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewhochler/b6931a11e46092abbc07a35a0050388e to your computer and use it in GitHub Desktop.
Save matthewhochler/b6931a11e46092abbc07a35a0050388e to your computer and use it in GitHub Desktop.
app=$HOME/apps/nzbget-loop
cat > $app << EOF
#!/usr/bin/env bash
export TERM="xterm"
until ~/apps/nzbget/nzbget -s; do
echo "NZBGet crashed. Respawning.." >&2
sleep 1
done
EOF
chmod +x $app
screen -d -m -S nzbget-loop $app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment