summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setup-unit9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/setup-unit b/tools/setup-unit
index 48e5c998..0df19070 100755
--- a/tools/setup-unit
+++ b/tools/setup-unit
@@ -138,6 +138,11 @@ OPTIONS
__EOF__
}
+info()
+{
+ >&2 echo "$(basename "$0"): info: $*";
+}
+
warn()
{
>&2 echo "$(basename "$0"): error: $*";
@@ -430,7 +435,11 @@ unit_ctl_edit()
|| echo ed;
) "$tmp";
+ trap "info 'ctl: edit: Invalid configuration saved in <$tmp>.'" ERR
+
unit_ctl_http ---s "$sock" PUT "$req_path" <"$tmp";
+
+ trap - ERR;
}