barcode-host/.kanbn/tasks/create-as-service.md
2023-07-27 12:37:24 -07:00

993 B

status, created, updated, type
status created updated type
4-Done 2023-06-06T02:52:34.344Z 2023-07-27T18:05:52.738Z kanbn

Create as Service

sudo -i
echo >/etc/systemd/system/barcode-host.service && nano /etc/systemd/system/barcode-host.service
[Unit]
Description=Barcode Server
After=multi-user.target
[Service]
User=unity4
WorkingDirectory=/var/www/Barcode-Host/Server
ExecStart=/usr/local/bin/dotnet /var/www/Barcode-Host/Server/Barcode.Host.Server.dll
Restart=always
# Environment=ASPNETCORE_ENVIRONMENT=Development
# Environment=ASPNETCORE_ENVIRONMENT=Staging
Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable barcode-host.service
systemctl start barcode-host.service
systemctl status barcode-host.service
systemctl stop barcode-host.service
journalctl -fu barcode-host.service
journalctl --rotate
journalctl --vacuum-time=1s

Sub-tasks

  • phares3757
  • unity4
  • unity5