Run / Stop linux systemctl service from .NetCore without typing password
For example we have a service test_service.service which need to turn ON or Off from our C# code.
Problem in this case to avoid typing password when we will need start/stop service. One solution to avoid typing password create scripts with commands to run and stop service and add this scripts path to Sudories Filve wit NOPASSD tag.
Example with descriptions:
https://bitbucket.org/ivankoff/controloneservice/src/master/src/ControOneService/
Comments
Comments are closed