This repository has been archived on 2025-09-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
repertory-ui/src/renderer/ipc/SystemIPC.js
2020-02-22 19:17:11 -06:00

17 lines
399 B
JavaScript

const Constants = require('../../constants');
const os = require('os');
const helpers = require('../../helpers');
const addListeners = (ipcMain, {closeApplication}) => {
ipcMain.on(Constants.IPC_Reboot_System, () => {
if (os.platform() === 'win32') {
helpers.executeAsync('shutdown.exe', ['/r', '/t', '30']);
}
closeApplication();
});
};
module.exports = {
addListeners
};