I'd like to run the following command when I press a button in the dashboard:
sudo systemctl restart socat.service
When I use the exec mode to do so, its output is this: sudo: no tty present and no askpass program specified
What's the best, most secure way of doing this? I don't want to make a security bodge....