Add the ability to disable install

This commit is contained in:
Alexandre CATTEAU 2022-03-17 14:59:20 +01:00
parent 4653935be7
commit 2994c107dc
2 changed files with 6 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
variables.conf
.disabled

View File

@ -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