From e55821f20e6b8d52b23c5bcd2ecaa585ac99e095 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Mon, 3 Apr 2023 10:40:15 +0200 Subject: adding service for esphomeapi, and allowing run.sh to take arguments --- esphomeapi@.service | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 esphomeapi@.service (limited to 'esphomeapi@.service') diff --git a/esphomeapi@.service b/esphomeapi@.service new file mode 100644 index 0000000..d10f8b4 --- /dev/null +++ b/esphomeapi@.service @@ -0,0 +1,17 @@ +[Unit] +Description=Simple service to start esphomeapi +StartLimitIntervalSec=100 +StartLimitBurst=5 + +[Service] +Type=simple +EnvironmentFile=%h/energyscripts/.env +WorkingDirectory=%h/energyscripts +ExecStart=%h/energyscripts/venv/bin/python3 -u scripts/esphomeapi.py -a %i +Restart=on-failure +TimeoutStopSec=70 +RestartSec=30 +SyslogIdentifier=%N + +[Install] +WantedBy=default.target -- cgit v1.2.3