From aee5871be01f31f51bd96a394217faeb82ec342a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Thu, 30 Jul 2026 08:11:46 -0500 Subject: [PATCH] Adjusted ci/install.sh to use cf-key from different locations other than /var/cfengine e.g. on Termux platform cf-key is in PATH after install but not in /var/cfengine Ticket: none Changelog: none --- ci/install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/install.sh b/ci/install.sh index 5a53c025ce..bb138aea5d 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -18,4 +18,13 @@ if [ ! -n "$TERMUX_VERSION" ]; then fi $GAINROOT make install -$GAINROOT /var/cfengine/bin/cf-key # to generate the hostkey +CFKEY=$(command -v cf-key) +if ! command -v cf-key; then + CFKEY=/var/cfengine/bin/cf-key + if [ ! -f /var/cfengine/bin/cf-key ]; then + echo "Can't find cf-key in PATH or at /var/cfengine/bin/cf-key. You will need to generate a hostkey yourself." + exit 0 + fi +fi +echo Generating hostkey with $CFKEY +$GAINROOT $CFKEY