mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
feat: restoring sso error
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import { existsSync, renameSync, unlinkSync } from 'node:fs';
|
import { existsSync, renameSync, unlinkSync } from 'node:fs';
|
||||||
|
|
||||||
|
import { cliLogger } from '@app/core/log';
|
||||||
|
|
||||||
export const removeSso = () => {
|
export const removeSso = () => {
|
||||||
const path = '/usr/local/emhttp/plugins/dynamix/include/.login.php';
|
const path = '/usr/local/emhttp/plugins/dynamix/include/.login.php';
|
||||||
const backupPath = path + '.bak';
|
const backupPath = path + '.bak';
|
||||||
@@ -11,7 +13,8 @@ export const removeSso = () => {
|
|||||||
unlinkSync(path);
|
unlinkSync(path);
|
||||||
}
|
}
|
||||||
renameSync(backupPath, path);
|
renameSync(backupPath, path);
|
||||||
|
cliLogger.debug('SSO login file restored.');
|
||||||
|
} else {
|
||||||
|
cliLogger.debug('No SSO login file backup found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Restored .login php file');
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user