Renew CAcert

From d00d3
Revision as of 12:36, 7 August 2011 by Andrenarchy (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Attention: replace the MACHINE variable (d00d3, user)!

export MACHINE=d00d3
export DATE=`date +%F-%H-%M-%S`

mkdir -p /etc/certbackup/${DATE}
cp -a /etc/${MACHINE}_* /etc/certbackup/${DATE}

cd /tmp
cp -a /etc/${MACHINE}_privatekey.pem .
# paste renewed CAcert certificate into ${MACHINE}_publiccert.pem
cat ${MACHINE}_publiccert.pem ${MACHINE}_privatekey.pem > ${MACHINE}_pubpriv.pem
chmod 640 ${MACHINE}_pubpriv.pem ${MACHINE}_privatekey.pem
chown root:sslusers ${MACHINE}_pubpriv.pem ${MACHINE}_privatekey.pem
mv ${MACHINE}_* /etc/
Personal tools