4 |
|
|
5 |
%define name phpki-ng |
%define name phpki-ng |
6 |
%define version 0.84 |
%define version 0.84 |
7 |
%define release 7 |
%define release 10 |
8 |
Summary: Phpki is a simple certificate management suite |
Summary: Phpki is a simple certificate management suite |
9 |
Name: %{name} |
Name: %{name} |
10 |
Version: %{version} |
Version: %{version} |
42 |
e-mail clients, SSL servers, and VPN applications. |
e-mail clients, SSL servers, and VPN applications. |
43 |
|
|
44 |
%changelog |
%changelog |
45 |
|
* Tue Apr 06 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-9.sme |
46 |
|
- And tidy up the copying wording. [SME: 11192] |
47 |
|
- Credit to Terry Fage for persisting with testing |
48 |
|
|
49 |
|
* Mon Apr 05 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-9.sme |
50 |
|
- Really fix the copy this time [SME: 11192] |
51 |
|
|
52 |
|
* Sat Apr 03 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-8.sme |
53 |
|
- copy phpki-store as a backup instead of move [SME: 11192] |
54 |
|
|
55 |
* Thu Apr 01 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-7.sme |
* Thu Apr 01 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-7.sme |
56 |
- Fix broken Download Certificate in Cert generation [SME: 11513] |
- Fix broken Download Certificate in Cert generation [SME: 11513] |
57 |
|
|
58 |
* Thu Mar 18 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-6.sme |
* Thu Mar 18 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-6.sme |
59 |
- Update html header info |
- Update html header info [SME: 11192] |
60 |
- Remove obsolete align |
- Remove obsolete align |
61 |
- Remove accidentally duplicated html |
- Remove accidentally duplicated html |
62 |
- Fix typo |
- Fix typo |
254 |
echo "* " |
echo "* " |
255 |
echo "* We cannot upgrade your existing certificates" |
echo "* We cannot upgrade your existing certificates" |
256 |
echo "* " |
echo "* " |
257 |
echo "* If we detect an existing certificate store" |
echo "* If you have existing certificates you want to use" |
258 |
echo "* we are going to move it" |
echo "* then start with a new CA, backup up, and then restore" |
259 |
|
echo "* your phpki-store directory in /opt/phpki" |
260 |
echo "* " |
echo "* " |
|
echo "* You can then start with a new CA and certificates" |
|
261 |
echo "******************************************************" |
echo "******************************************************" |
262 |
echo "" |
echo "" |
263 |
|
|
266 |
RANDOM=$$ |
RANDOM=$$ |
267 |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
PHPKIDIR=$(( 1 + $RANDOM%99999 )) |
268 |
echo "Number is $PHPKIDIR" |
echo "Number is $PHPKIDIR" |
269 |
echo "moving from /opt/phpki/phpki-store to /opt/phpki/phpki-store.$PHPKIDIR" |
echo "Copying from /opt/phpki/phpki-store to /opt/phpki/phpki-store.$PHPKIDIR" |
270 |
mv /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
/bin/cp -pr /opt/phpki/phpki-store "/opt/phpki/phpki-store.$PHPKIDIR" |
271 |
echo "Directory moved...continuing installaton" |
echo "Directory copied...continuing installaton" |
272 |
else |
else |
273 |
echo "No directory detected...continuing installaton" |
echo "No directory detected...continuing installaton" |
274 |
fi |
fi |
275 |
|
|
276 |
echo "Creating phpki user" |
|
277 |
|
|
278 |
if ! /usr/bin/id phpki &>/dev/null; then |
if ! /usr/bin/id phpki &>/dev/null; then |
279 |
|
echo "Creating phpki user" |
280 |
/usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ |
/usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \ |
281 |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
%logmsg "Unexpected error adding user \"phpki\". Abort installation." |
282 |
fi |
fi |