Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Unit]
- Description=.NET Prototypes Application on Linux
- [Service]
- WorkingDirectory=/home/ec2-user/webapi
- ExecStart=/usr/bin/dotnet /home/ec2-user/webapi/prototypes.dll
- Restart=always
- # Restart service after 10 seconds if the dotnet service crashes:
- RestartSec=10
- KillSignal=SIGINT
- SyslogIdentifier=dotnet-example
- User=apache
- Environment=ASPNETCORE_ENVIRONMENT=Production
- Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
- TimeoutStopSec=90
- [Install]
- WantedBy=multi-user.target
- [ec2-user@ip-172-31-6-33 dotnet]$ sudo systemctl status kestrel-mytest.service
- รข kestrel-mytest.service - .NET Prototypes Application on Linux
- Loaded: loaded (/etc/systemd/system/kestrel-mytest.service; disabled; vendor preset: disabled)
- Active: activating (auto-restart) (Result: exit-code) since Tue 2019-02-19 14:06:39 UTC; 6s ago
- Process: 3902 ExecStart=/usr/bin/dotnet /home/ec2-user/webapi/prototypes.dll (code=exited, status=145)
- Main PID: 3902 (code=exited, status=145)
- 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
- Feb 19 14:06:39 ip-172-31-6-33.ap-southeast-1.compute.internal systemd[1]: Unit kestrel-mytest.service entered failed state.
- Feb 19 14:06:39 ip-172-31-6-33.ap-southeast-1.compute.internal systemd[1]: kestrel-mytest.service failed.
- [ec2-user@ip-172-31-6-33 dotnet]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement