From 7d715e3329f7134dd1fb984c8d05b9bd66f7fa11 Mon Sep 17 00:00:00 2001 From: mischa Date: Sat, 3 Jun 2023 18:07:04 +0000 Subject: [PATCH] make WORKDIR self discoverable --- README.md | 1 - uptimeatomic | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ba95771..ae622ca 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ An example site is available [here](https://ops.lowfive.nl/) To install uptimeatomic: * Clone the repository and go to the created directory -* Edit `uptimeatomic` base variables to your liking * Edit `uptimeatomic.conf` variables to your liking * Edit the checks file `checks.csv` * To add incidents or maintenance, edit `incidents.txt` diff --git a/uptimeatomic b/uptimeatomic index 56db054..16ecaac 100755 --- a/uptimeatomic +++ b/uptimeatomic @@ -5,7 +5,7 @@ # export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin CONFIGFILE="uptimeatomic.conf" -WORKDIR="/home/mischa/uptimeatomic" +WORKDIR=$(cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P) usage() { echo "usage: ${0##*/} [-c checksfile] [-i incidentsfile] [-p pastincidentsfile] [-o htmlfile]" 1>&2