Skip to content

Commit

Permalink
Merge pull request #14 from raackley/add_source
Browse files Browse the repository at this point in the history
Find the config file in the script directory
  • Loading branch information
aaronhurt authored Jan 27, 2017
2 parents 34299dc + 5900e27 commit 17bf8fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zfs-replicate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ elif [ -f "config.sh" ]; then
## source default config
printf "Sourcing configuration from config.sh\n"
. "config.sh"
elif [ -f "$(dirname ${0})/config.sh" ]; then
## source script path config
printf "Sourcing configuration from $(dirname ${0})/config.sh\n"
. "$(dirname ${0})/config.sh"
else
## display error
printf "ERROR: Cannot continue without a valid configuration file!\n"
Expand Down

0 comments on commit 17bf8fb

Please sign in to comment.