Created
February 21, 2022 09:49
-
-
Save cantoute/6932260efa31e31b5a16c13bb744d812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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