Created
May 26, 2013 05:23
-
-
Save mhluska/5651797 to your computer and use it in GitHub Desktop.
Used with udev to sync a backup drive.
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 | |
# Find the absolute path of the script. | |
# See http://stackoverflow.com/a/246128/659910. | |
DIR="$( cd "$( dirname "$0" )" && pwd )" | |
# This script is called by `udev` and needs to complete quickly, so we | |
# background another script. `${1}` contains the device name. | |
nohup "${DIR}/sync-backup-drive.sh" ${1} >/dev/null 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment