Commit 74f2519d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Denis Brækhus

Improve VCL name

If a VCL was reloaded at the date of this commit, it would change from:

    reload_20170321T174643

to

    reload_20170321_174643

This gives second resolution to the reload's name but keeps the name
compact, parseable, and naturally sorted. An example is displayed with
the usage error message.
parent ecdc5b30
......@@ -22,6 +22,11 @@ usage() {
When <file> is empty or missing, the active VCL's file is used but
will fail if the active VCL wasn't loaded from a file.
Upon success, the name of the loaded VCL is constructed from the
current date and time, for example:
$(vcl_reload_name)
EOF
exit 1
}
......@@ -81,7 +86,7 @@ vcl_active_file() {
}
vcl_reload_name() {
printf "reload_%s" "$(date +%Y%m%dT%H%M%S)"
printf "reload_%s" "$(date +%Y%m%d_%H%M%S)"
}
if [ $# -gt 0 ] && [ "$1" = -n ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment