Skip to content

Commit c14d92c

Browse files
weltekialexellis
authored andcommitted
Use full faasd binary path in instructions on RHEL
On RHEL systems the installation path of faasd, /usr/local/bin, is not in the sudo PATH by default. Use the full path to the faasd binary in any printed instruction to work around this. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent 934d326 commit c14d92c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

hack/install-edge.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ ${BINLOCATION}arkade oci install --path ${tmpdir} \
9595
cd ${tmpdir}
9696
./install.sh ./
9797

98+
if has_dnf; then
99+
isRhelLike=true
100+
else
101+
isRhelLike=false
102+
fi
103+
104+
binaryName="faasd"
105+
if [ "$isRhelLike" = true ]; then
106+
binaryName="/usr/local/bin/faasd"
107+
fi
108+
98109
echo ""
99110
echo "3.1 Commercial users can create their license key as follows:"
100111
echo ""
@@ -103,12 +114,12 @@ echo "sudo nano /var/lib/faasd/secrets/openfaas_license"
103114
echo ""
104115
echo "3.2 For personal, non-commercial use only, GitHub Sponsors of @openfaas (25USD+) can run:"
105116
echo ""
106-
echo "sudo -E faasd github login"
107-
echo "sudo -E faasd activate"
117+
echo "sudo -E ${binaryName} github login"
118+
echo "sudo -E ${binaryName} activate"
108119
echo ""
109120
echo "4. Then perform the final installation steps"
110121
echo ""
111-
echo "sudo -E sh -c \"cd ${tmpdir}/var/lib/faasd && faasd install\""
122+
echo "sudo -E sh -c \"cd ${tmpdir}/var/lib/faasd && ${binaryName} install\""
112123
echo ""
113124
echo "5. Refer to the complete handbook and supplementary documentation at:"
114125
echo ""

0 commit comments

Comments
 (0)