From 4fe4ea2a96858eff09b731dd9a501ccea91b6383 Mon Sep 17 00:00:00 2001 From: robocopAlpha Date: Sun, 18 Jul 2021 03:32:24 +0300 Subject: [PATCH] cd to set_env.sh so cron can find it. --- pull.lists.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pull.lists.sh b/pull.lists.sh index bd57590..d6e7766 100755 --- a/pull.lists.sh +++ b/pull.lists.sh @@ -1,4 +1,15 @@ #!/usr/bin/env bash + +#--- Set parameters based on Distribution +if [ "$(uname)" == "Darwin" ]; then + cd '/Users/deepankar/OneDrive - O365 Turun yliopisto/Git/Gitlab.DC/pihole_lists' || echo "can't find ~/Git/Gitlab.DC/pihole_lists" +elif [ "$(uname)" == "Linux" ]; then + cd '/home/dietpi/pihole_lists' || echo "/home/dietpi not found." +else + echo "Only MacOS and Linux are supported." + exit 1 +fi + [[ -f set_env.sh ]] && source set_env.sh || { echo "set_env.sh not found"; exit 1; } # Mounting storage