forked from futureshocked/RaspberryPiFullStack_Raspbian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrf24_receiver.service
24 lines (21 loc) · 870 Bytes
/
rf24_receiver.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
# Start the rf24 listener script as a service at startup
# Copy this file into /etc/systemd/system as root, for example:
# sudo cp myscript.service /etc/systemd/system/rf24_receiver.service
# Once this has been copied, you can attempt to start the service using the following command:
# sudo systemctl start rf24_receiver.service
# Stop it using following command:
# sudo systemctl stop rf24_receiver.service
# When you are happy that this starts and stops your app, you can have it start automatically on reboot by using this command:
# sudo systemctl enable rf24_receiver.service
[Unit]
Description=RF24 Receiver Service
After=syslog.target
[Service]
ExecStart=/var/www/lab_app/bin/python /var/www/lab_app/rf24_receiver.py
WorkingDirectory=/var/www/lab_app/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=root
[Install]
WantedBy=multi-user.target