Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux service .net app

[Unit]
Description=IG Render Service

[Service]
WorkingDirectory=/opt/myservice
ExecStart=/usr/bin/dotnet myservice.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=myservice
# Optionaly define a specific user to run the service
# User=someuser
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linux #service #app
ADD COMMENT
Topic
Name
8+5 =