Add check for nc binary
This commit is contained in:
parent
58cb637f72
commit
4e44267a70
|
@ -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
|
echxit "ERROR: Invalid or unset value for argument -b: '$max_minutes_since_last_backup'" 2
|
||||||
fi
|
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
|
if ! im_root; then
|
||||||
echxit "ERROR: This script must be run as root" 1
|
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
|
elif pgrep -f "$borg" >/dev/null; then
|
||||||
echxit "ERROR: Borg seems to be active already" 11
|
echxit "ERROR: Borg seems to be active already" 11
|
||||||
elif [ -n "$remote_host_port" ]; then
|
elif [ -n "$remote_host_port" ]; then
|
||||||
|
|
Loading…
Reference in New Issue