From d154b27d4425156f5ea15deb72481e9b4da84600 Mon Sep 17 00:00:00 2001 From: Sean Date: Sun, 6 Apr 2025 18:49:00 -0400 Subject: [PATCH] Add info on service configuration for marketdaatserver --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 97234c3..34a762a 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,33 @@ Microsoft.AspNet.WebApi.OwinSelfHost 3) IPMonitor 4) Models +MarketDataService +/etc/systemd/system +sudo nano mks.service + +Place the following into the file + +[Unit] +Description=Market Data Server Service +After=network-online.target +Wants=network-online.target + +[Service] +User=pi # Or the user your executable runs as +WorkingDirectory=/opt/MarketData/MarketDataServer +ExecStart=/opt/MarketData/MarketDataServer/mks +Restart=always +RestartSec=5 # Seconds to wait before restarting (optional) +KillMode=process # Ensures the service is killed gracefully + +[Install] +WantedBy=multi-user.target + + +Enable the service: sudo systemctl enable mks.service. +Start the service: sudo systemctl start mks.service. +Check the status: sudo systemctl status mks.service + ****************************************************************************************************** Adding notes on MariaDb as I plan to migrate the MySql over to one of the Raspberry PI 4 B's https://hevodata.com/learn/mysql-to-mariadb/ @@ -39,6 +66,8 @@ ping a.b.c > /dev/null 2>&1 CRON SCHEDULE +sudo crontab -e + ** THE LATEST AND GREATEST IS ALWAYS AT THE BOTTOM Also note that 1>/dev/null is synonymous to, but more explicit than >/dev/null