summarylogtreecommitdiffstats
path: root/example.hook
diff options
context:
space:
mode:
authorsurefire2017-02-04 22:04:13 +0300
committersurefire2017-02-04 22:04:13 +0300
commit6d5f71e755aa36553ec4a3a6f4d48bf48745f482 (patch)
tree3774076653193bcacc9138be187e72e116e59808 /example.hook
parent6820a7d6e86e8826f2777150520eba583a645749 (diff)
downloadaur-6d5f71e755aa36553ec4a3a6f4d48bf48745f482.tar.gz
upgpkg: acme-client 0.1.16
Diffstat (limited to 'example.hook')
-rwxr-xr-xexample.hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/example.hook b/example.hook
new file mode 100755
index 000000000000..807de8863c69
--- /dev/null
+++ b/example.hook
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# https://www.freedesktop.org/software/systemd/man/systemd.exec.html#%24EXIT_CODE
+# > $EXIT_STATUS contains the numeric exit code formatted as string if $EXIT_CODE is "exited",
+# > and the signal name in all other cases.
+#
+# $EXIT_STATUS of acme-client
+# 1 on failure
+# 2 if the certificates didn't change (up to date)
+# 0 if certificates were changed (revoked or updated).
+
+if [ 0 = "$EXIT_STATUS" ]; then
+ systemctl reload nginx.service
+fi