From c3df53e17505df21d954e563ef0ad6f052731299 Mon Sep 17 00:00:00 2001 From: Hannes Braun <hannes.braun@slub-dresden.de> Date: Tue, 9 Aug 2022 10:48:32 +0200 Subject: [PATCH] Added check to installation script, if JSON parser is installed. Updated README.md. --- README.md | 11 +++++++++++ install.sh | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index b189fc2..d99f88f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,17 @@ It comes with a built-in mechanism to check and delete old backups. ## Installing / Getting started +### Requirements + +#### OS + +This project is developed and tested under Debian 11 Bullseye. + +#### JSON Parser + +The script is loading its needed configuration from a JSON file. Therefor a JSON parser is needed. +In this project, the parser 'jq' is being used. It can be installed via the default Debian repository. + Clone the repository and execute the installation script. ```shell diff --git a/install.sh b/install.sh index a4636fc..7a4bac6 100644 --- a/install.sh +++ b/install.sh @@ -10,6 +10,12 @@ else cd /opt/sql-backup fi +# Check if jqis installed +if [ -z $(which apt) ]; then + echo "ERROR: JSON parser 'jq' not found, but necessary. Make sure that 'jq' is installed correctly." + exit 1 +fi + # Update repository bash update.sh -- GitLab