banner
棒无

陪棒无度过漫长岁月

坟墓里寂静无比,埋葬你的是所有你未说出的话
telegram
github
bilibili
email
mastodon
follow

CDN Certificate Automatic Refresh

Cause: Because configuring domestic CDNs usually requires manually uploading certificates, but the domain name certificates I applied for are usually valid for three months, so I wanted to write a script to automatically update the certificates.
Environment:
1panel (a domestic panel, automatically applies for certificates, and has other powerful functions, very convenient)

Taking the Doyun cloud I use as an example, you can find the corresponding SDK for other manufacturers.
The code is as follows:

The basic implementation idea is to first delete the existing certificate, then add the read certificate, and then upload and activate the uploaded certificate, so as to achieve automatic configuration of CDN certificates. You can use the automatic timing execution script function of 1panel to execute it every month to update the certificate. It really implements a strange little trick✊✊✊.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.