I have added a service via dietpi-services
that I would like to be able to control via SSH e.g.
ssh dietpi@remote-machine 'dietpi-services stop myservice'
This works when issued with root
credentials but obviously, that is not the answer. Is there a ‘best’ way to do this?
As of now, I have tried adding:
%dietpi ALL= NOPASSWD: /boot/dietpi/dietpi-services stop myservice
…to /etc/sudoers
, but no luck:
[FAILED] DietPi-Services | Root privileges required. Please run the command with “sudo” or “G_SUDO”.
The reason that I use DietPi so much is that I am not massively familiar with Linux and so don’t know whether I am even going down the wrong rabbit-hole!