mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-16 07:55:13 +02:00
Automatic operation of Ahoy on an RPi can be based on the systemd method. To activate systemd processes for ahoy, the config ahoy.service is needed.
37 lines
1.2 KiB
Desktop File
37 lines
1.2 KiB
Desktop File
######################################################################
|
|
# systemd.service configuration for ahoy (lumapu)
|
|
# users can modify the lines:
|
|
# Description
|
|
# ExecStart (example: name of config file)
|
|
# WorkingDirectory (absolute path to your private ahoy dir)
|
|
# To change other config parameter, please consult systemd documentation
|
|
#
|
|
# To activate this service, create a link, enable and start the ahoy.service
|
|
# $ 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
|
|
# $ systemctl --user status 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
|
|
|