mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
When some files are re-generated, the old copy is now kept as -old.
This commit is contained in:
parent
b0733a85de
commit
15ee1feca5
3 changed files with 21 additions and 0 deletions
|
@ -1785,6 +1785,7 @@ function CreateMeshCentralServer(config, args) {
|
|||
if ((vapidKeys == null) || (typeof vapidKeys.publicKey != 'string') || (typeof vapidKeys.privateKey != 'string')) {
|
||||
console.log("Generating web push VAPID keys...");
|
||||
vapidKeys = obj.webpush.generateVAPIDKeys();
|
||||
obj.common.moveOldFiles([obj.path.join(obj.datapath, 'vapid.json')]);
|
||||
obj.fs.writeFileSync(obj.path.join(obj.datapath, 'vapid.json'), JSON.stringify(vapidKeys));
|
||||
}
|
||||
obj.webpush.vapidPublicKey = vapidKeys.publicKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue