Skip to content

Commit ee8f094

Browse files
committed
Create daily_certcheck_update.sh
-Add the ssl update script to v4 tools
1 parent d5d4431 commit ee8f094

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# The location your renewal tool places your certificates.
5+
CERT_DIR="/home/ircd/ssl/irc4fun.net/staffdocs"
6+
7+
# The location of the InspIRCd config directory.
8+
INSPIRCD_CONFIG_DIR="/home/ircd/inspircd/run/conf"
9+
10+
# The location of the InspIRCd pid file.
11+
INSPIRCD_PID_FILE="/home/ircd/inspircd/run/data/inspircd.pid"
12+
13+
# The user:group that InspIRCd runs as.
14+
INSPIRCD_OWNER="ircd:ircd"
15+
16+
# Script to download the new SSL certs -siniStar
17+
#
18+
19+
wget -r --user USERNAME --password PASSWORD https://irc4fun.net/staffdocs/fullchain.pem
20+
wget -r --user USERNAME --password PASSWORD https://irc4fun.net/staffdocs/privkey.pem
21+
22+
# Script to extract new SSL certs pulled in from secure site
23+
#
24+
25+
if [ -e ${CERT_DIR} -a -e ${INSPIRCD_CONFIG_DIR} ]
26+
then
27+
cp "${CERT_DIR}/fullchain.pem" "${INSPIRCD_CONFIG_DIR}/cert.pem"
28+
cp "${CERT_DIR}/privkey.pem" "${INSPIRCD_CONFIG_DIR}/key.pem"
29+
chown ${INSPIRCD_OWNER} "${INSPIRCD_CONFIG_DIR}/cert.pem" "${INSPIRCD_CONFIG_DIR}/key.pem"
30+
if [ -e ${INSPIRCD_PID_FILE} ]
31+
then
32+
kill -USR1 `cat ${INSPIRCD_PID_FILE}`
33+
fi
34+
fi

0 commit comments

Comments
 (0)