v1.0.1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
MSG="$1"
|
||||
DOMAIN="$2"
|
||||
|
||||
13
md-renewed
13
md-renewed
@@ -81,13 +81,13 @@ function domain_renew
|
||||
{
|
||||
local DOMAIN="$1"
|
||||
for scr in /etc/md-renewed/$DOMAIN/*.cert; do
|
||||
run_copy "$1" "/etc/md-renewed/$DOMAIN/$scr"
|
||||
run_copy "$1" "$scr"
|
||||
done
|
||||
for scr in /etc/md-renewed/$DOMAIN/*.service; do
|
||||
run_service "$1" "/etc/md-renewed/$DOMAIN/$scr"
|
||||
run_service "$1" "$scr"
|
||||
done
|
||||
for scr in /etc/md-renewed/$DOMAIN/*.sh; do
|
||||
/etc/md-renewed/$DOMAIN/$scr "$1"
|
||||
$scr "$1"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -97,13 +97,18 @@ for f in /run/md-renewed/*; do
|
||||
if [[ ! -f $f ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
HTTPD_RELOAD=y
|
||||
DOMAIN=$(basename $f)
|
||||
|
||||
rm -f $f
|
||||
|
||||
if [[ ! -d /etc/md-renewed/$f ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
domain_renew "$1"
|
||||
domain_renew "$DOMAIN"
|
||||
|
||||
done
|
||||
|
||||
if [[ $HTTPD_RELOAD == y ]]; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: md-renewed
|
||||
Version: 1.0.0
|
||||
Version: 1.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Restart service on Apache module mod_md certificate renewal
|
||||
License: MIT
|
||||
@@ -18,6 +18,7 @@ Source7: example.cert
|
||||
Source8: example.sh
|
||||
|
||||
Requires: httpd
|
||||
Requires: mod_md
|
||||
%{?systemd_requires}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
@@ -28,8 +29,8 @@ Restart service on Apache module mod_md certificate renewal
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_libexecdir}/md-renewed
|
||||
install -m 0644 %{SOURCE0} %{buildroot}%{_libexecdir}/md-renewed/
|
||||
install -m 0644 %{SOURCE1} %{buildroot}%{_libexecdir}/md-renewed/
|
||||
install -m 0755 %{SOURCE0} %{buildroot}%{_libexecdir}/md-renewed/md-renewed
|
||||
install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/md-renewed/md-message
|
||||
|
||||
install -d -m 0755 %{buildroot}%{_unitdir}
|
||||
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/
|
||||
@@ -77,5 +78,5 @@ install -m 0755 %{SOURCE8} %{buildroot}%{_sysconfdir}/md-renewed/example.com/
|
||||
%{_tmpfilesdir}/md-renewed.conf
|
||||
|
||||
%changelog
|
||||
* Thu Nov 30 2021 Zoran Pericic <zpericic@netst.org> - 1.0.0-1
|
||||
* Tue Nov 30 2021 Zoran Pericic <zpericic@netst.org> - 1.0.0-1
|
||||
Initial release
|
||||
|
||||
Reference in New Issue
Block a user