Skip to content
Snippets Groups Projects
Commit 540afb8b authored by pharook's avatar pharook
Browse files

Script now detects binaries existence by calling shell builtin, not binaries themselves

parent d1a2754c
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,9 @@ function flee { echo -e "$1"; exit $2; }
[ -z "$client" -o -z "$password" ] && flee "Usage: ${0%.*} client.name password" 255
openssl version >/dev/null 2>&1 || flee "Haven't found 'openssl' binary."
curl --version >/dev/null 2>&1 || flee "Haven't found 'curl' binary."
for n in openssl curl; do
command -v "$n" 2>/dev/null || flee "Haven't found $n binary."
done
for n in "$csr" "$key" "$cert"; do
[ -e "$n" ] && flee "$n already exists, I won't overwrite, move them away first, please." 254
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment