From 2994c107dc892fed9f70c87478a7faf357bfb864 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Thu, 17 Mar 2022 14:59:20 +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 bfdbd30..99a3140 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ variables.conf +.disabled diff --git a/install.sh b/install.sh index 5b89e16..603a89a 100755 --- a/install.sh +++ b/install.sh @@ -3,6 +3,11 @@ run_directory=$(dirname "$0") user=$(whoami) +if [ -f $run_directory/.disabled ]; then + echo "Installation is disabled. Exiting..." + exit 0 +fi + echo "Copying Systemd units to system directory..." sudo cp $run_directory/systemd-templates/firefox-backup-.service /etc/systemd/system/firefox-backup-$user.service sudo sed -i -e "s/PH_USER/$user/g" /etc/systemd/system/firefox-backup-$user.service