mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: dont remove login file without a backup presetn
This commit is contained in:
@@ -4,13 +4,12 @@ export const removeSso = () => {
|
||||
const path = '/usr/local/emhttp/plugins/dynamix/include/.login.php';
|
||||
const backupPath = path + '.bak';
|
||||
|
||||
// Remove the SSO login inject file if it exists
|
||||
if (existsSync(path)) {
|
||||
unlinkSync(path);
|
||||
}
|
||||
|
||||
// Move the backup file to the original location
|
||||
if (existsSync(backupPath)) {
|
||||
// Remove the SSO login inject file if it exists
|
||||
if (existsSync(path)) {
|
||||
unlinkSync(path);
|
||||
}
|
||||
renameSync(backupPath, path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user