Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions autostart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Systemd unit service
## How to install
Copy **timestampsdr.service** to **/etc/systemd/system**

sudo cp ./timestampsdr.service /etc/systemd/system

Modify file **timestampsdr.service** according to your settings

sudo nano /etc/systemd/system/timestampsdr.service

Turns the service on, on the next reboot

sudo systemctl enable timestampsdr.service
Start the service

sudo systemctl start timestampsdr.service

## Useful commands
Logs can be viewed as follows

journalctl -u timestampsdr
Follow all logs

journalctl -f -u timestampsdr
Stop the service

sudo systemctl stop timestampsdr
Turns the service off on the next reboot

sudo systemctl disable timestampsdr.service

12 changes: 12 additions & 0 deletions autostart/timestampsdr.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=TimestampSDR Service
After=network.target

[Service]
WorkingDirectory=/home/pi/timestampSDR
ExecStart=/usr/bin/node main.js
Restart=on-failure
User=pi

[Install]
WantedBy=multi-user.target