Using Rasbian. My Console apps was launched using crontab
@reboot /home/pi/MyConsole.sh
The MyConsole.sh will then fire "sudo mono MyConsole.exe"
From time to time, when my apps received a "Reboot" command, I am trying to reboot the system using:
System.Diagnostics.Process.Start("sudo shutdown -r now");
But it doesn't work, I really have no clue after searching in the web for two days :(
Appreciate any help.
Thanks In Advance
Add the user that is running to the power group (if such a user exists) or read this up: https://wiki.archlinux.org/index.php/allow_users_to_shutdown