Source13: 07-contact.sh
Source14: hook.sh
Source15: hook.functions
-Source16: hook.global
+Source16: hook.custom_functions
+Source17: hook.global
Patch0: tld.patch
URL: https://github.com/lukas2511/dehydrated
BuildRequires: rpmbuild(macros) >= 1.713
$RPM_BUILD_ROOT/etc/%{name}/conf.d/
install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/%{name}/hooks/hook.sh
cp -p %{SOURCE15} $RPM_BUILD_ROOT/etc/%{name}/hooks/functions
-cp -p %{SOURCE16} $RPM_BUILD_ROOT/etc/%{name}/hooks.d/global
+cp -p %{SOURCE16} $RPM_BUILD_ROOT/etc/%{name}/hooks/custom_functions
+cp -p %{SOURCE17} $RPM_BUILD_ROOT/etc/%{name}/hooks.d/global
%clean
rm -rf $RPM_BUILD_ROOT
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/conf.d/*.sh
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/domains.txt
%attr(755,root,root) /etc/%{name}/hooks
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/custom_functions
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/functions
%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/%{name}/hooks/hook.sh
%attr(755,root,root) /etc/%{name}/hooks.d
#!/bin/bash
-# This file contains base functions for dehydrated hook scripts.
+# This file contains base functions for dehydrated system hook scripts.
# Please do not edit this file! It will be overwritten by package updates!
# If you need to implement your own functions, take a look at
# custom_functions file.
# certificate is successfully deployed
HOOKS_D="/etc/dehydrated/hooks.d"
-# Load fucntions
+# Load system fucntions
. "/etc/dehydrated/hooks/functions"
+# Load custom fucntions
+. "/etc/dehydrated/hooks/custom_functions"
HANDLER="${1}"
shift
case "${HANDLER}" in
deploy_cert)
deploy_cert "$@"
+ custom_deploy_cert "$@"
;;
clean_challenge)
clean_challenge "$@"
+ custom_clean_challenge "$@"
;;
deploy_challenge)
deploy_challenge "$@"
+ custom_deploy_challenge "$@"
;;
invalid_challenge)
invalid_challenge "$@"
+ custom_invalid_challenge "$@"
;;
request_failure)
request_failure "$@"
+ custom_request_failure "$@"
;;
unchanged_cert)
unchanged_cert "$@"
+ custom_unchanged_cert "$@"
;;
startup_hook)
startup_hook "$@"
+ custom_startup_hook "$@"
;;
exit_hook)
exit_hook "$@"
+ custom_exit_hook "$@"
;;
esac