mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-04 04:35:55 +02:00
Create ahoy.service
This commit is contained in:
parent
2eef3b5bb4
commit
899dbaa346
1 changed files with 34 additions and 0 deletions
34
tools/rpi/ahoy.service
Normal file
34
tools/rpi/ahoy.service
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
######################################################################
|
||||||
|
# systemd.service configuration for ahoy (lumapu)
|
||||||
|
# users can modify the lines:
|
||||||
|
# - Description
|
||||||
|
# - ExecStart (for example: name of config file)
|
||||||
|
# - WorkingDirectory
|
||||||
|
# To change other configs, please consult systemd documentation
|
||||||
|
#
|
||||||
|
# to activate this service, create a link like:
|
||||||
|
# $ mkdir -p $HOME/.config/systemd/user && ln -sf $(pwd)/ahoy/tools/rpi/ahoy.service -t $HOME/.config/systemd/user
|
||||||
|
# $ systemctl --user status ahoy
|
||||||
|
# $ systemctl --user enable ahoy
|
||||||
|
# $ systemctl --user start ahoy
|
||||||
|
#
|
||||||
|
# 2023.01 <PaeserBastelstube>
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
|
||||||
|
Description=ahoy (lumapu) as Service
|
||||||
|
After=network.target local-fs.target time-sync.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/env python3 -um hoymiles --log-transactions --verbose --config ahoy.yml
|
||||||
|
RestartSec=10
|
||||||
|
Restart=on-failure
|
||||||
|
Type=simple
|
||||||
|
|
||||||
|
# WorkingDirectory must be an absolute path - not relative path
|
||||||
|
WorkingDirectory=/home/pi/ahoy/tools/rpi
|
||||||
|
EnvironmentFile=/etc/environment
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Add table
Reference in a new issue