Skip to content

Instantly share code, notes, and snippets.

@cantoute
Created February 21, 2022 09:49
Show Gist options
  • Save cantoute/6932260efa31e31b5a16c13bb744d812 to your computer and use it in GitHub Desktop.
Save cantoute/6932260efa31e31b5a16c13bb744d812 to your computer and use it in GitHub Desktop.
#!/bin/bash
err=false
tmp=$(mktemp) && {
varnishd -C -f /etc/varnish/default.vcl 2>$tmp \
|| {
r=$?
err=true
cat $tmp
}
rm -f $tmp
}
if [ "$err" == "false" ]
then
echo Configuration compiled succefully
else
# echo Configuration compilation failed with status $r
exit $r
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment