xynat/lib/toolcheck

24 lines
456 B
Plaintext
Raw Normal View History

2024-05-25 00:27:22 +02:00
#!/bin/bash
#
# Make sure all required tools are installed.
#
workplace_toolcheck(){
## BINARIES IN PATH ##
bin_tool_list=("grep")
for b in $bin_tool_list; do
if [[ ! -f $(which "$b") ]]; then
log_error "Missing tool '$b'"
fi
done
## DPKG PACKAGES ##
dpkg_tool_list=("sed iptables iproute2")
for d in $dpkg_tool_list; do
if ! dpkg -s $d 2>&1 | grep -q "Status: install ok installed"; then
log_error "Missing tool '$d'"
fi
done
}