This commit is contained in:
Alex Janka 2023-12-25 18:05:47 +11:00
commit 871ba961cc
6 changed files with 51 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target

7
Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "tesla-charge-controller"
version = "0.1.0"

26
Cargo.toml Normal file
View file

@ -0,0 +1,26 @@
[package]
name = "tesla-charge-controller"
version = "0.1.0"
edition = "2021"
license = "MITNFA"
description = "Controls Tesla charge rate based on solar charge data"
authors = ["Alex Janka"]
[package.metadata.deb]
maintainer-scripts = "debian/"
systemd-units = { enable = false }
depends = ""
assets = [
[
"target/release/tesla-charge-controller",
"usr/bin/",
"755",
],
[
"conf/default",
"etc/tesla-charge-controller/config",
"644",
],
]
[dependencies]

0
conf/default Normal file
View file

14
debian/service vendored Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Tesla Charge Controller
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=tesla
ExecStart=/usr/bin/tesla-charge-controller
[Install]
WantedBy=multi-user.target

3
src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}