Bash - Varnish - Load new VCL without restarting Varnish

#!/bin/bash VCL=$PWD"/my-custom.vcl" TIME=$(date +%s) PRESET_NAME="varnish_"$TIME ADMIN_IP="127.0.0.1:6082" SECRET="/etc/varnish/secret" # Load the file into memory varnishadm -S $SECRET -T $ADMIN_IP vcl.load $PRESET_NAME $VCL # Active this Varnish config varnishadm -S $SECRET -T $ADMIN_IP vcl.use $PRESET_NAME

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.