Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 371 Bytes

README.md

File metadata and controls

10 lines (8 loc) · 371 Bytes

RemoteShutdown

ASP.NET Core application to halt a local linux server remotely

Setup:

  • Change in appsetting.json the HTTP Certificate and Key path
  • Add to sudoers file permission for the app user to halt system shutdownapp ALL=(ALL) NOPASSWD:/usr/sbin/halt

How to call remotely curl -H 'XAPIKEY:<APIKEYIN User Secrets>' https://<address>:<port>/shutdown