mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
improved updating process
we need to kill every freedata binary before closing or updating the tnc
This commit is contained in:
parent
69c3ccd86c
commit
a2df7db3f9
45
gui/main.js
45
gui/main.js
|
@ -592,38 +592,29 @@ function close_sub_processes(){
|
|||
}
|
||||
|
||||
|
||||
mainLog.warn('closing tnc');
|
||||
mainLog.warn('closing tnc and daemon');
|
||||
try {
|
||||
|
||||
if(os.platform()=='win32' || os.platform()=='win64'){
|
||||
exec('Taskkill', ['/IM', 'freedata-tnc.exe', '/F'])
|
||||
}
|
||||
|
||||
if(os.platform()=='linux'){
|
||||
if(os.platform()=='win32' || os.platform()=='win64'){
|
||||
exec('Taskkill', ['/IM', 'freedata-tnc.exe', '/F'])
|
||||
exec('Taskkill', ['/IM', 'freedata-daemon.exe', '/F'])
|
||||
}
|
||||
|
||||
exec('pkill', ['-9', 'freedata-tnc'])
|
||||
|
||||
// on macOS we need to kill the daemon as well. If we are not doing this,
|
||||
// the daemon wont startup again because the socket is already in use
|
||||
//for some reason killing the daemon is killing our screen on Ubuntu..it seems theres another "daemon" out there...
|
||||
exec('pkill', ['-9', 'freedata-daemon'])
|
||||
}
|
||||
if(os.platform()=='linux'){
|
||||
|
||||
exec('pkill', ['-9', 'freedata-tnc'])
|
||||
exec('pkill', ['-9', 'freedata-daemon'])
|
||||
}
|
||||
|
||||
if(os.platform()=='darwin'){
|
||||
if(os.platform()=='darwin'){
|
||||
|
||||
exec('pkill', ['-9', 'freedata-tnc'])
|
||||
|
||||
// on macOS we need to kill the daemon as well. If we are not doing this,
|
||||
// the daemon wont startup again because the socket is already in use
|
||||
//for some reason killing the daemon is killing our screen on Ubuntu..it seems theres another "daemon" out there...
|
||||
exec('pkill', ['-9', 'freedata-daemon'])
|
||||
|
||||
exec('pkill', ['-9', 'freedata-tnc'])
|
||||
exec('pkill', ['-9', 'freedata-daemon'])
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
mainLog.error(e)
|
||||
}
|
||||
|
||||
/*
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "FreeDATA",
|
||||
"version": "0.4.0-alpha.2",
|
||||
"version": "0.4.0-alpha.3",
|
||||
"description": "FreeDATA ",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1906,22 +1906,18 @@ ipcRenderer.on('action-updater', (event, arg) => {
|
|||
|
||||
}
|
||||
if (arg.status == "update-not-available"){
|
||||
//bootstrap.Toast.getOrCreateInstance(document.getElementById('toastUpdateChecking')).hide();
|
||||
|
||||
document.getElementById("updater_status").innerHTML = '<i class="bi bi-check2-square ms-1 me-1" style="color: white;"></i>';
|
||||
document.getElementById("updater_status").className = "btn btn-success btn-sm";
|
||||
document.getElementById("update_and_install").style.display = 'none';
|
||||
}
|
||||
if (arg.status == "update-available"){
|
||||
|
||||
//bootstrap.Toast.getOrCreateInstance(document.getElementById('toastUpdateChecking')).hide();
|
||||
|
||||
document.getElementById("updater_status").innerHTML = "update available...";
|
||||
document.getElementById("updater_status").innerHTML = '<i class="bi bi-hourglass-split ms-1 me-1" style="color: white;"></i>';
|
||||
document.getElementById("updater_status").className = "btn btn-warning btn-sm";
|
||||
document.getElementById("update_and_install").style.display = 'none';
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (arg.status == "error"){
|
||||
|
||||
|
|
Loading…
Reference in a new issue