mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-18 11:34:43 -04:00
Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors
This commit is contained in:
commit
72106ba4c4
48 changed files with 2764 additions and 268 deletions
|
@ -497,6 +497,16 @@ class Database {
|
|||
const shmPath = Database.path + "-shm";
|
||||
const walPath = Database.path + "-wal";
|
||||
|
||||
// Make sure we have a backup to restore before deleting old db
|
||||
if (
|
||||
!fs.existsSync(this.backupPath)
|
||||
&& !fs.existsSync(shmPath)
|
||||
&& !fs.existsSync(walPath)
|
||||
) {
|
||||
log.error("db", "Backup file not found! Leaving database in failed state.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Delete patch failed db
|
||||
try {
|
||||
if (fs.existsSync(Database.path)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue