-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcpu.service
42 lines (39 loc) · 1004 Bytes
/
cpu.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
#
# Copyright 2020-2021 by Murray Altheim. All rights reserved. This file is part
# of the Robot Operating System project, released under the MIT License. Please
# see the LICENSE file included as part of this package.
#
# author: Murray Altheim
# created: 2020-08-01
# modified: 2020-08-19
#
# This cpu service configuration file should be copied to:
#
# /lib/systemd/system/
#
# After copying the file you'll need to reload all daemons:
#
# % sudo systemctl daemon-reload
#
# and to enable its use upon each startup:
#
# % sudo systemctl enable cpu
#
# You can then use it like service, e.g.,
#
# % sudo systemctl status cpu
# % sudo systemctl start cpu
# % sudo systemctl stop cpu
#
# This requires use of the python-daemon library, which can be installed via:
#
# % sudo pip3 install python-daemon
#
[Unit]
Description=CPU Display
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/ros/cpu.py > /home/pi/log/cpu.log 2>&1
[Install]
WantedBy=multi-user.target