From 358b934206cec08b7d243934782b49a3b412ec24 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 17 Mar 2022 14:58:19 +0100 Subject: [PATCH] Add the ability to disable install --- .gitignore | 1 + install.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index c9242e7..f5fa4d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ variables.conf *.key +.disabled diff --git a/install.sh b/install.sh index 58145f4..b6ea571 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +if [ -f $run_directory/.disabled ]; then + echo "Installation is disabled. Exiting..." + exit 0 +fi + echo "Copying Systemd units to system directory..." sudo cp $(dirname "$0")/systemd-templates/dns-update.service /etc/systemd/system/ sudo cp $(dirname "$0")/systemd-templates/dns-update.timer /etc/systemd/system/