-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNRFReceiver.service
34 lines (28 loc) · 1.43 KB
/
NRFReceiver.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[Unit]
Description=NRF24L01 Receiver
[Service]
# will set the Current Working Directory (CWD)
WorkingDirectory=/home/weather/
# systemd will run this executable to start the service
ExecStart=python3 /home/weather/nrf24stuff/nrf24_receiver.py
# to query logs using journalctl, set a logical name here
SyslogIdentifier=NRFReceiver
# Use your username to keep things simple, for production scenario's I recommend a dedicated user/group.
# If you pick a different user, make sure dotnet and all permissions are set correctly to run the app.
# To update permissions, use 'chown yourusername -R /srv/SiriusXM' to take ownership of the folder and files,
# Use 'chmod +x /srv/SiriusXM/SiriusXM' to allow execution of the executable file.
User=weather
# ensure the service restarts after crashing
Restart=always
# amount of time to wait before restarting the service
RestartSec=5
# copied from dotnet documentation at
# https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1#code-try-7
#KillSignal=SIGINT
#Environment=ASPNETCORE_ENVIRONMENT=Production
#Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
# This environment variable is necessary when dotnet isn't loaded for the specified user.
# To figure out this value, run 'env | grep DOTNET_ROOT' when dotnet has been loaded into your shell.
#Environment=DOTNET_ROOT=/opt/rh/rh-dotnet31/root/usr/lib64/dotnet
[Install]
WantedBy=multi-user.target