Skip to content

Instantly share code, notes, and snippets.

@yazinsai
Last active May 19, 2019 12:25
Show Gist options
  • Save yazinsai/1fe9ecda68faa73488ff58b922cd4386 to your computer and use it in GitHub Desktop.
Save yazinsai/1fe9ecda68faa73488ff58b922cd4386 to your computer and use it in GitHub Desktop.
Persistently run a process over SSH even if disconnected
#!/bin/sh
if test -t 1; then exec 1>/dev/null
fi
if test -t 2; then exec 2>/dev/null
fi
"$@" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment