Compare commits
No commits in common. "feat/systemd" and "main" have entirely different histories.
feat/syste
...
main
@ -56,9 +56,6 @@ Use `https://your.domain.tld/api/metrics` to retrieve useful insides for monitor
|
|||||||
## Add a Location Tracker
|
## Add a Location Tracker
|
||||||
We use the [SenseCAP T1000-B](https://www.seeedstudio.com/SenseCAP-Card-Tracker-T1000-B-p-5698.html) from seeedstudio because of the fair price and multiple location providers. However, you can use any LoRaWAN-enabled tracker that is compatible with TTN and supports the required payload fields.
|
We use the [SenseCAP T1000-B](https://www.seeedstudio.com/SenseCAP-Card-Tracker-T1000-B-p-5698.html) from seeedstudio because of the fair price and multiple location providers. However, you can use any LoRaWAN-enabled tracker that is compatible with TTN and supports the required payload fields.
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
Run `journalctl -u locationhub.service -f` to see log output.
|
|
||||||
|
|
||||||
### Onboard SenseCAP T1000-B
|
### Onboard SenseCAP T1000-B
|
||||||
1. Download and install the App [SenseCraft](https://play.google.com/store/apps/details?id=cc.seeed.sensecapmate)
|
1. Download and install the App [SenseCraft](https://play.google.com/store/apps/details?id=cc.seeed.sensecapmate)
|
||||||
2. Skip the user account at startup with `Skip` in the upper right corner
|
2. Skip the user account at startup with `Skip` in the upper right corner
|
||||||
|
@ -1,29 +1,22 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=LocationHub Service
|
Description=LocationHub
|
||||||
Documentation=https://git.mosad.xyz/localhorst/LocationHub
|
|
||||||
After=network.target systemd-networkd-wait-online.service mysqld.service
|
After=network.target systemd-networkd-wait-online.service mysqld.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=locationhub
|
User=locationhub
|
||||||
Group=locationhub
|
|
||||||
WorkingDirectory=/home/locationhub/git/LocationHub/server/
|
WorkingDirectory=/home/locationhub/git/LocationHub/server/
|
||||||
|
ExecStart=/usr/bin/npm run dev
|
||||||
# Combine commands for build and start
|
|
||||||
ExecStart=/bin/bash -c "/usr/bin/npm run build && /usr/bin/npm run start"
|
|
||||||
|
|
||||||
# Restart policies
|
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
StandardOutput=append:/var/log/LocationHub.log
|
||||||
|
StandardError=append:/var/log/LocationHub.log
|
||||||
# Logging configuration
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
SyslogIdentifier=locationhub
|
|
||||||
|
|
||||||
# Resource control (optional but helps stability)
|
|
||||||
MemoryLimit=512M
|
|
||||||
CPUQuota=50%
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
Activate Systemd Job
|
||||||
|
```
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable locationhub.service
|
||||||
|
systemctl start locationhub.service
|
||||||
|
systemctl status locationhub.service
|
Loading…
Reference in New Issue
Block a user