fix: dont remove login file without a backup presetn

This commit is contained in:
Eli Bosley
2025-01-22 16:15:36 -05:00
parent cb59090698
commit 1854aa9f28

View File

@@ -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);
}