最初コミット
This commit is contained in:
30
192.168.10.106/update_certs.sh
Normal file
30
192.168.10.106/update_certs.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
DATE=$(date +"%Y年%m月%d日")
|
||||
|
||||
echo "192.168.10.106 SSL証明書が更新されました。 (${DATE})
|
||||
---------------
|
||||
" > /root/cert.txt
|
||||
|
||||
/usr/sbin/acme-client -v 076.moe >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v sns.076.moe >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v 076.ne.jp >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v 076.co.jp >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v technicalsuwako.moe >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v monka1.nl >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v mondzorgkerk.nl >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v fair.moe >> /root/cert.txt
|
||||
/usr/sbin/acme-client -v cw-games.org >> /root/cert.txt
|
||||
|
||||
/etc/rc.d/relayd stop >> /root/cert.txt
|
||||
|
||||
cp -v /etc/ssl/076.moe.crt /etc/prosody/certs/ >> /root/cert.txt
|
||||
cp -v /etc/ssl/private/076.moe.key /etc/prosody/certs/ >> /root/cert.txt
|
||||
|
||||
/etc/rc.d/relayd start >> /root/cert.txt
|
||||
/etc/rc.d/httpd stop >> /root/cert.txt
|
||||
/etc/rc.d/httpd start >> /root/cert.txt
|
||||
/etc/rc.d/prosody restart >> /root/cert.txt
|
||||
|
||||
cat /root/cert.txt | mail -s "192.168.10.106 SSL証明書更新 (${DATE})" reports@076.ne.jp
|
||||
rm -rf /root/cert.txt
|
||||
Reference in New Issue
Block a user