[packages/letsencrypt.sh: 1/4] install sample hook
glen
glen at pld-linux.org
Sat May 14 21:05:13 CEST 2016
commit 5765eca7783d3ac542f5ffecb4e0de077a6a7905
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat May 14 20:14:08 2016 +0300
install sample hook
config.sh | 1 +
hook.sh | 11 +++++++++++
letsencrypt.sh.spec | 5 ++++-
3 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/letsencrypt.sh.spec b/letsencrypt.sh.spec
index 4cbbc9c..3bf69f7 100644
--- a/letsencrypt.sh.spec
+++ b/letsencrypt.sh.spec
@@ -1,7 +1,7 @@
Summary: letsencrypt/acme client implemented as a shell-script
Name: letsencrypt.sh
Version: 0.1.0
-Release: 0.7
+Release: 0.8
License: MIT
Group: Applications/Networking
Source0: https://github.com/lukas2511/letsencrypt.sh/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -10,6 +10,7 @@ Source1: apache.conf
Source2: lighttpd.conf
Source3: config.sh
Source4: domains.txt
+Source5: hook.sh
Patch0: pld.patch
URL: https://github.com/lukas2511/letsencrypt.sh
BuildRequires: rpmbuild(macros) >= 1.713
@@ -55,6 +56,7 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
+install -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf
%clean
@@ -88,6 +90,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.sh
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/domains.txt
+%attr(750,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hook.sh
# challenges written here from letsencrypt.sh, need to be readable by webserver
%dir %attr(751,root,root) %{_sysconfdir}/acme-challenges
diff --git a/config.sh b/config.sh
index 5b105e6..1ab731a 100644
--- a/config.sh
+++ b/config.sh
@@ -1 +1,2 @@
#CONTACT_EMAIL=root at example.org
+#HOOK=/etc/webapps/letsencrypt.sh/hook.sh
diff --git a/hook.sh b/hook.sh
new file mode 100755
index 0000000..d175d83
--- /dev/null
+++ b/hook.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$1" in
+deploy_cert)
+ echo " + Hook: Restarting Webserver..."
+ /sbin/service lighttpd reload
+ ;;
+*)
+ echo " + Hook: $1: Nothing to do..."
+ ;;
+esac
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/letsencrypt.sh.git/commitdiff/6a03632a08b4bebcfef0c281c3239610e3dd810b
More information about the pld-cvs-commit
mailing list