Skip to content
Snippets Groups Projects

Keep symlinks relative

Merged Alex Iribarren requested to merge symlinks into master
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
@@ -7,13 +7,15 @@ if [ "$CHECK" == "200" ]; then
echo "Certificate symlink for $REPOID is good, nothing to do"
else
echo "Current certificate for $REPOID doesn't auth, let's fix that"
for CERT in `ls /certs/*pem`
pushd /certs
for CERT in `ls *.pem`
do
STATUS_CODE=$(curl -k -E $CERT $URL --write-out %{http_code} --silent --output /dev/null)
if [ "$STATUS_CODE" == "200" ]; then
echo "$CERT is valid for $REPOID"
ln -sf $CERT /certs/$REPOID
ln -sf $CERT $REPOID
echo $REPOID > /etc/yum/vars/certificate
fi
done
popd
fi
Loading