This file contains 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 | |
# self-detach.sh | |
# Self-detaching shell script | |
#------------------------------------------ | |
if [ -z "$_DETACHED_" ] | |
then | |
# Run this script silently in background | |
# mode with low priority | |
_DETACHED_=1 nohup nice sh $0 &>/dev/null |