#!/bin/sh
<tal:defines define="vdir varnish_config_dir;
                     vstart string:$vdir/varnish-start;
                     vstop string:$vdir/varnish-stop;
                     vcl string:$vdir/varnish.vcl">
echo 'Copying config / helper files to <tal:user replace="vdir" />'
cp varnish-start varnish-stop varnish.vcl <tal:dir replace="vdir" />
# echo 'Giving <tal:user replace="varnish_user" /> ownership of its config and helper files'
# chown <tal:user replace="varnish_user" /> <tal:dir replace="vcl" /> <tal:dir replace="vstart" /> <tal:dir replace="vstop" />
echo 'Setting user read and execute access to the config / helper files'
chmod u+r <tal:dir replace="vcl" /> <tal:dir replace="vstart" /> <tal:dir replace="vstop" />
chmod u+x <tal:dir replace="vstart" /> <tal:dir replace="vstop" />
</tal:defines>