Skip to content

Commit

Permalink
cloud: duckdns prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 16, 2023
1 parent aff1e86 commit 13cc562
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/cloud/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
configDir: greenlockD,
packageAgent: 'Scrypted/1.0',
maintainerEmail: '[email protected]',
staging: true,
notify: function (event, details) {
if ('error' === event) {
// `details` is an error object in this case
Expand Down Expand Up @@ -338,8 +337,9 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
this.storageSettings.values.duckDnsCertValid = true;
const { pems } = result;
const certificate = this.storageSettings.values.certificate;
if (certificate.certificate !== pems.cert || certificate.serviceKey !== pems.privkey) {
certificate.certificate = pems.cert;
const chain = pems.cert.trim() + '\n' + pems.chain.trim();
if (certificate.certificate !== chain || certificate.serviceKey !== pems.privkey) {
certificate.certificate = chain;
certificate.serviceKey = pems.privkey;
this.storageSettings.values.certificate = certificate;
deviceManager.requestRestart();
Expand Down

0 comments on commit 13cc562

Please sign in to comment.