-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate_pi_sensors.service
44 lines (37 loc) · 1.37 KB
/
template_pi_sensors.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
35
36
37
38
39
40
41
42
43
44
# Copyright 2017 Paul Broadhead
# Contact: [email protected]
#
# This file is part of pi_sensors.
#
# pi_sensors is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pi_sensors is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pi_sensors. If not, see <http://www.gnu.org/licenses/>.
# Set up
# Use the provided template_pi_sensors.service to create pi_sensors.service
# editing the ###path-to-code###/ and ###user### in the [Service] section
# systemctl enable ###path-to-your-service-script####/pi_sensors.service
# Start the service
# sudo systemctl start pi_sensors.service
# Check the status
# systemctl status pi_sensors.service
# Monitor log output
# journalctl -u pi_sensors.service -f
[Unit]
Description=Pi Sensors Client
Wants=network-online.target
After=network.target network-online.target
[Service]
ExecStart=/bin/bash -c "###path-to-code###/client/bin/run_loop.sh"
User=###user###
Group=###user###
[Install]
WantedBy=multi-user.target