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