mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-02-28 22:09:10 -05:00
Added root check for service install/uninstall
This commit is contained in:
parent
2d18ba76cc
commit
2368b9fa17
@ -68,6 +68,12 @@ else
|
|||||||
if ((msh.InstallFlags & 1) == 1) { buttons.unshift("Connect"); }
|
if ((msh.InstallFlags & 1) == 1) { buttons.unshift("Connect"); }
|
||||||
if ((msh.InstallFlags & 2) == 2)
|
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 (s)
|
||||||
{
|
{
|
||||||
if (process.platform == 'darwin' || require('message-box').kdialog)
|
if (process.platform == 'darwin' || require('message-box').kdialog)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user