better detection of where the script actually resides

This commit is contained in:
2014-11-28 15:40:46 +01:00
parent 92206c5d86
commit f198b605a3

View File

@@ -1,6 +1,6 @@
#!/bin/bash
cd $(dirname $0)
cd "$(dirname "$(readlink -f "$0")")"
# Test if config.cfg exists and set needed variables
if [ ! -e config.cfg ]; then echo "Missing config.cfg file. Edit and rename config.cfg.sample"; exit 1; fi