added check for absolute path to supplied paths
This commit is contained in:
parent
746144e40a
commit
02489e6813
2
.vscode/numbered-bookmarks.json
vendored
2
.vscode/numbered-bookmarks.json
vendored
@ -6,7 +6,7 @@
|
||||
-1,
|
||||
19,
|
||||
54,
|
||||
758,
|
||||
774,
|
||||
68,
|
||||
-1,
|
||||
-1,
|
||||
|
24
setup.sh
24
setup.sh
@ -320,7 +320,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
echo -e "\n${cyan}---exiting---\n${norm}"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
/*)
|
||||
# validate path
|
||||
if [ -f "${inputCertPath}" ]; then
|
||||
CertPath="${inputCertPath}"
|
||||
@ -346,6 +346,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# path must be absolute and start with a slash
|
||||
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -360,7 +364,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
echo -e "\n${cyan}---exiting---\n${norm}"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
/*)
|
||||
# validate path
|
||||
if [ -f "${inputKeyPath}" ]; then
|
||||
KeyPath="${inputKeyPath}"
|
||||
@ -386,6 +390,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# path must be absolute and start with a slash
|
||||
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -409,7 +417,7 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
echo -e "\n${cyan}---exiting---\n${norm}"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
/*)
|
||||
# validate path
|
||||
if [ -f "${inputCAChainPath}" ]; then
|
||||
CAChainPath="${inputCAChainPath}"
|
||||
@ -435,6 +443,10 @@ if [ "${useSSL}" -eq 1 ] && [ "${useCertbot}" -eq 0 ]; then
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# path must be absolute and start with a slash
|
||||
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
@ -488,7 +500,7 @@ while true; do
|
||||
generateDH=1
|
||||
break
|
||||
;;
|
||||
*)
|
||||
/*)
|
||||
# validate path
|
||||
if [ -f "${inputDHPath}" ]; then
|
||||
DHPath="${inputDHPath}"
|
||||
@ -514,6 +526,10 @@ while true; do
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# path must be absolute and start with a slash
|
||||
echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user