mirror of https://github.com/lumapu/ahoy.git
4 changed files with 148 additions and 18 deletions
@ -0,0 +1,35 @@ |
|||
###################################################################### |
|||
# 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, enable and start ahoy.service |
|||
# $ systemctl --user enable $(pwd)/ahoy/tools/rpi/ahoy.service |
|||
# $ systemctl --user status 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 |
|||
|
@ -0,0 +1,37 @@ |
|||
###################################################################### |
|||
# 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, enable and start ahoy.service |
|||
# $ systemctl --user enable /home/pi/ahoy/tools/rpi/ahoy@bookworm.service |
|||
# $ systemctl --user status ahoy@bookworm.service |
|||
# $ systemctl --user start ahoy@bookworm.service |
|||
# $ systemctl --user stop ahoy@bookworm.service |
|||
# $ systemctl --user disable ahoy@bookworm.service |
|||
# |
|||
# 2023.01 <PaeserBastelstube> |
|||
# 2024.01 <PaeserBastelstube> |
|||
###################################################################### |
|||
|
|||
[Unit] |
|||
Description=ahoy (lumapu) as Service |
|||
|
|||
[Service] |
|||
ExecStart=/bin/bash -c '\ |
|||
source /home/pi/ahoyenv/bin/activate; \ |
|||
python3 -um hoymiles --log-transactions --verbose --config ahoy.yml' |
|||
RestartSec=30 |
|||
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 |
|||
|
@ -0,0 +1,46 @@ |
|||
###################################################################### |
|||
# 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, enable and start ahoy.service: |
|||
# - Create folder ahoy in /home/ and set owner to the user that the |
|||
# service should be executed for (e.g. pi) |
|||
# - Copy folder contents to new folder |
|||
# - Adjust the user that this service should be executed as, avoid root |
|||
# - Execute commands to setup, check and start/stop as wanted |
|||
# $ sudo systemctl enable /home/ahoy/tools/rpi/ahoy@bookworm_system.service |
|||
# $ sudo systemctl status ahoy@bookworm_system |
|||
# $ sudo systemctl start ahoy@bookworm_system |
|||
# $ sudo systemctl stop ahoy@bookworm_system |
|||
# $ sudo systemctl disable ahoy@bookworm_system |
|||
# |
|||
# 2023.01 <PaeserBastelstube> |
|||
# 2023.03 <DM6JM> |
|||
# 2024.01 <PaeserBastelstube> |
|||
###################################################################### |
|||
|
|||
[Unit] |
|||
|
|||
Description=ahoy (lumapu) as Service |
|||
After=network.target local-fs.target time-sync.target |
|||
|
|||
[Service] |
|||
ExecStart=/bin/bash -c '\ |
|||
source /home/pi/ahoyenv/bin/activate; \ |
|||
python3 -um hoymiles --log-transactions --verbose --config ahoy.yml' |
|||
RestartSec=30 |
|||
Restart=on-failure |
|||
Type=simple |
|||
User=pi |
|||
|
|||
# WorkingDirectory must be an absolute path - not relative path |
|||
WorkingDirectory=/home/ahoy/tools/rpi |
|||
EnvironmentFile=/etc/environment |
|||
|
|||
[Install] |
|||
WantedBy=default.target |
|||
|
Loading…
Reference in new issue