From c4a9e9ded8b27986dbca1948828db8d04b8bbe43 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Sat, 11 Apr 2020 13:04:22 +0100 Subject: [PATCH] Linux service definition --- api.blog.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 api.blog.service diff --git a/api.blog.service b/api.blog.service new file mode 100644 index 0000000..33d23ec --- /dev/null +++ b/api.blog.service @@ -0,0 +1,16 @@ +[Unit] +Description=Robware Blog API + +[Service] +WorkingDirectory=/var/www/Api.Blog +ExecStart=/usr/bin/dotnet /var/www/Api.Blog/Robware.Api.Blog.dll +Restart=always +# Restart service after 10 seconds if the dotnet service crashes: +RestartSec=10 +KillSignal=SIGINT +SyslogIdentifier=Api.Blog +User=www-data +Environment=ASPNETCORE_ENVIRONMENT=Production + +[Install] +WantedBy=multi-user.target \ No newline at end of file