From 36964accdc137a3a52d9a74d78045dbf0e750a81 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 11 Apr 2022 23:40:43 +0000 Subject: [PATCH] Use variables for paths --- cassh.sh | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/cassh.sh b/cassh.sh index 50777d1..1478960 100644 --- a/cassh.sh +++ b/cassh.sh @@ -137,20 +137,20 @@ main_issue() usage fi - if [ ! -f ca.pub ]; then - err "no ca.pub found" + if [ ! -f "$PATH_CA_PUB" ]; then + err "no $PATH_CA_PUB found" fi - if ! ssh-add $qflag $vflag -T ca.pub; then + if ! ssh-add $qflag $vflag -T "$PATH_CA_PUB"; then err "can't use CA key" fi - if [ ! -d pubkeys/ ]; then + if [ ! -d "$PATH_PUBKEYS_DIR/" ]; then err "no pubkeys directory found" fi - if [ ! -f serial.txt ]; then - date -u +%Y%m%d000000000 >serial.txt + if [ ! -f "$PATH_CA_SERIAL" ]; then + date -u +%Y%m%d000000000 >"$PATH_CA_SERIAL" fi - read -r serial