https://github.com/nikoo-asadnejad/sample-dotnet-systemdservice
This repository contains the configuration file for a systemd unit used to host a .NET application on a Linux distribution. Systemd is an init system that provides a standard process for controlling what programs run when a Linux system boots up, making it ideal for managing and maintaining long-running applications, like those built in .NET.
https://github.com/nikoo-asadnejad/sample-dotnet-systemdservice
bash-script dotnet dotnetcore linux linux-shell shel shell-script systemd systemd-service systemd-unit
Last synced: 3 months ago
JSON representation
This repository contains the configuration file for a systemd unit used to host a .NET application on a Linux distribution. Systemd is an init system that provides a standard process for controlling what programs run when a Linux system boots up, making it ideal for managing and maintaining long-running applications, like those built in .NET.
- Host: GitHub
- URL: https://github.com/nikoo-asadnejad/sample-dotnet-systemdservice
- Owner: Nikoo-Asadnejad
- Created: 2024-03-30T14:45:47.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-19T16:41:46.000Z (about 1 year ago)
- Last Synced: 2025-04-10T00:01:25.151Z (6 months ago)
- Topics: bash-script, dotnet, dotnetcore, linux, linux-shell, shel, shell-script, systemd, systemd-service, systemd-unit
- Language: Shell
- Homepage:
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .Net Systemd Unit
This repository contains the configuration file for a systemd unit used to host a .NET application on a Linux distribution. Systemd is an init system that provides a standard process for controlling what programs run when a Linux system boots up, making it ideal for managing and maintaining long-running applications, like those built in .NET.
## Overview:
This configuration file simplifies the process of deploying and managing .NET applications on Linux servers. It ensures that your .NET application is started as a service, restarted automatically if it crashes, and controlled via standard systemd commands (e.g., start, stop, restart, enable, and disable).## Usage :
Rename ServiceName and Path in file.Add The File To :
`/etc/systemd/system/myapp.service`
Reload Systemd:
```bash
sudo systemctl daemon-reload
```Enable and Start The Service:
```bash
sudo systemctl enable myapp.service
sudo systemctl start myapp.service
```Check the Status:
```bash
sudo systemctl status myapp.service
```
Logs and Troubleshooting:
```bash
journalctl -u myapp.service -e
```Restart the service:
```bash
sudo systemctl restart myapp.service
```