From 2f0f9cd59ac337b238c277ea9d5afa8cefa937db Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Tue, 14 Jan 2025 20:10:26 +0100 Subject: new config location + file path as variable --- bin/aptly-lirionde | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/aptly-lirionde b/bin/aptly-lirionde index 2b896ec..1d193fe 100755 --- a/bin/aptly-lirionde +++ b/bin/aptly-lirionde @@ -25,12 +25,13 @@ # is interrupted. Both can be considered a TODO. -if [ ! -r "/etc/aptly-lirionde/aptly.conf" ];then - printf '/etc/aptly-lirionde/aptly.conf cannot be read, exiting!\n' >&2 +MYCONF="/etc/lirion/aptly.conf" +if [ ! -r "$MYCONF" ];then + printf '%b cannot be read, exiting!\n' "$MYCONF" >&2 exit 254 else - # shellcheck disable=SC1091 - source /etc/aptly-lirionde/aptly.conf || exit 254 + # shellcheck disable=SC1091,SC1090 + source "$MYCONF" || exit 254 fi MALFORMED=0 @@ -40,7 +41,7 @@ MALFORMED=0 [ -z "$PBASE" ] && MALFORMED=1 [ -z "$TBASE" ] && MALFORMED=1 -[ "$MALFORMED" -eq 1 ] && printf '/etc/aptly-lirionde/aptly.conf malformed, exiting.\n' >&2 && exit 253 +[ "$MALFORMED" -eq 1 ] && printf '%b malformed, exiting.\n' "$MYCONF" >&2 && exit 253 printf -v repjoined "%s-$(date -I) " "${MYREPS[@]}" -- cgit v1.2.3