12 lines
261 B
Bash
Executable file
12 lines
261 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -Eeuo pipefail
|
|
|
|
# Return 1 if any of the arguments is missing
|
|
|
|
for dep in "$@"; do
|
|
if ! (command -v "$dep" &>/dev/null || systemctl -q list-unit-files "${dep}.service" &>/dev/null); then
|
|
echo -e "${dep} not found!"
|
|
exit 1
|
|
fi
|
|
done
|