-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathgoveebttemplogger.service
33 lines (29 loc) · 1.25 KB
/
goveebttemplogger.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
# Contents of /etc/systemd/system/goveebttemplogger.service
[Unit]
Description=GoveeBTTempLogger service
After=bluetooth.target dbus-org.bluez.service network-online.target
Requires=bluetooth.target
StartLimitBurst=5
StartLimitIntervalSec=33
# The user and directories are created by the postinst script with the following commands:
# adduser --system --ingroup www-data goveebttemplogger
# mkdir --verbose --mode 0755 --parents /var/log/goveebttemplogger /var/cache/goveebttemplogger /var/www/html/goveebttemplogger
# chown --changes --recursive goveebttemplogger:www-data /var/log/goveebttemplogger /var/cache/goveebttemplogger /var/www/html/goveebttemplogger
# chmod --changes --recursive 0644 /var/log/goveebttemplogger/* /var/cache/goveebttemplogger/* /var/www/html/goveebttemplogger/*
#
# They are run as root during the installation of the service. The service runs as the newly crteated user.
[Service]
Type=simple
Restart=always
RestartSec=30
User=goveebttemplogger
Group=www-data
ExecStart=/usr/local/bin/goveebttemplogger \
--verbose 0 \
--log /var/log/goveebttemplogger \
--time 60 \
--svg /var/www/html/goveebttemplogger --battery 8 --minmax 8 \
--cache /var/cache/goveebttemplogger
KillSignal=SIGINT
[Install]
WantedBy=multi-user.target