diff --git a/usr/local/jilits/borgmatic-wrapper.sh b/usr/local/jilits/borgmatic-wrapper.sh index 13f16a6..e378adc 100755 --- a/usr/local/jilits/borgmatic-wrapper.sh +++ b/usr/local/jilits/borgmatic-wrapper.sh @@ -120,10 +120,14 @@ if ! is_int "$max_minutes_since_last_backup"; then echxit "ERROR: Invalid or unset value for argument -b: '$max_minutes_since_last_backup'" 2 fi +for bin in jq nc; do + if ! command -v "$bin" >/dev/null; then + echxit "ERROR: '$bin' not installed" 3 + fi +done + if ! im_root; then echxit "ERROR: This script must be run as root" 1 -elif ! command -v jq >/dev/null; then - echxit "ERROR: jq not installed" 3 elif pgrep -f "$borg" >/dev/null; then echxit "ERROR: Borg seems to be active already" 11 elif [ -n "$remote_host_port" ]; then