github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/docker/git-ssh/check.sh (about) 1 #!/bin/sh 2 3 PUSR=git 4 5 # Expected exit code 6 EXIT_CODE_EXP=128 7 8 su -l ${PUSR} -s /bin/sh -c \ 9 "ssh -q \ 10 -o \"UserKnownHostsFile=/dev/null\" \ 11 -o \"StrictHostKeyChecking=no\" \ 12 ${PUSR}@localhost > /dev/null 2>&1" 13 14 if [ "$?" -eq "${EXIT_CODE_EXP}" ]; then 15 exit 0 # Pass 16 else 17 exit 1 # Fail 18 fi