mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 14:45:52 -05:00
Added root check for service install/uninstall
This commit is contained in:
parent
de2e7f6900
commit
a3609728e0
@ -68,6 +68,12 @@ else
|
||||
if ((msh.InstallFlags & 1) == 1) { buttons.unshift("Connect"); }
|
||||
if ((msh.InstallFlags & 2) == 2)
|
||||
{
|
||||
if (!require('user-sessions').isRoot())
|
||||
{
|
||||
console.log('\n' + "Elevated permissions is required to install/uninstall the agent.");
|
||||
console.log("Please try again with sudo.");
|
||||
process.exit();
|
||||
}
|
||||
if (s)
|
||||
{
|
||||
if (process.platform == 'darwin' || require('message-box').kdialog)
|
||||
|
Loading…
Reference in New Issue
Block a user