Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. [Unit]
  2. Description=.NET Prototypes Application on Linux
  3.  
  4. [Service]
  5. WorkingDirectory=/home/ec2-user/webapi
  6. ExecStart=/usr/bin/dotnet /home/ec2-user/webapi/prototypes.dll
  7. Restart=always
  8. # Restart service after 10 seconds if the dotnet service crashes:
  9. RestartSec=10
  10. KillSignal=SIGINT
  11. SyslogIdentifier=dotnet-example
  12. User=apache
  13. Environment=ASPNETCORE_ENVIRONMENT=Production
  14. Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
  15.  
  16. TimeoutStopSec=90
  17.  
  18. [Install]
  19. WantedBy=multi-user.target
  20.  
  21. [ec2-user@ip-172-31-6-33 dotnet]$ sudo systemctl status kestrel-mytest.service
  22.  
  23. รข kestrel-mytest.service - .NET Prototypes Application on Linux
  24. Loaded: loaded (/etc/systemd/system/kestrel-mytest.service; disabled; vendor preset: disabled)
  25. Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-19 14:06:39 UTC; 6s ago
  26. Process: 3902 ExecStart=/usr/bin/dotnet /home/ec2-user/webapi/prototypes.dll (code=exited, status=145)
  27. Main PID: 3902 (code=exited, status=145)
  28.  
  29. Feb 19 14:06:39 ip-172-31-6-33.ap-southeast-1.compute.internal systemd[1]: kestrel-mytest.service: main process exited, code=exited, status=145/n/a
  30. Feb 19 14:06:39 ip-172-31-6-33.ap-southeast-1.compute.internal systemd[1]: Unit kestrel-mytest.service entered failed state.
  31. Feb 19 14:06:39 ip-172-31-6-33.ap-southeast-1.compute.internal systemd[1]: kestrel-mytest.service failed.
  32. [ec2-user@ip-172-31-6-33 dotnet]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement