bin/: Fix preamble to handle invocation through a symlink.
[distorted-letsencrypt] / bin / le
diff --git a/bin/le b/bin/le
index 11963b5..0ec46b2 100755 (executable)
--- a/bin/le
+++ b/bin/le
@@ -1,7 +1,8 @@
 #! /bin/sh
 set -e
-. "${0%/*}/../config.sh"
-. $home/lib/lib.sh
+prog=$(readlink -e "$0")
+. "${prog%/*}/../config.sh"
+. "$home/lib/lib.sh"
 
 run_as_user "$@"
 prepare_tmp le-user