diff --git a/.gitignore b/.gitignore index e69de29..76c3fa8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,7 @@ +# Docker +*.tar.gz +*.log + +# Editor-Dateien +.vscode/ +*.swp \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..aac2856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## 0.8.0 +- Aktualisiert auf Folding@home 8.4. +- Initiale Version des Forks. \ No newline at end of file diff --git a/DOCS.md b/DOCS.md index e69de29..d7a0269 100644 --- a/DOCS.md +++ b/DOCS.md @@ -0,0 +1,10 @@ +# Folding@home Add-on Dokumentation + +## Konfiguration +- **user**: Dein Folding@home-Benutzername (optional). +- **team**: Team-ID, z. B. 247478 für Home Assistant. +- **passkey**: Dein Folding@home-Passkey (optional). +- **power**: Leistungsstufe (light, medium, full). + +## Zugriff +- Webinterface: `http://:7396` \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e69de29..9c9280a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Basis-Image von hassio-addons +FROM ghcr.io/hassio-addons/debian-base:7.3.1 + +# Installiere Abhängigkeiten und Folding@home 8.4 +RUN \ + apt-get update && \ + apt-get install -y --no-install-recommends \ + curl \ + ca-certificates && \ + # Lade Folding@home 8.4 herunter (URL anpassen, sobald verfügbar) + curl -sSL https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v8.4/fahclient_8.4.0-64bit-release.deb -o fahclient.deb && \ + dpkg -i fahclient.deb && \ + rm fahclient.deb && \ + # Bereinige Cache + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +# Kopiere rootfs +COPY rootfs / + +# Exponiere Ports (Folding@home-Webinterface) +EXPOSE 7396 + +# S6-Overlay für Dienstverwaltung +CMD [ "/run.sh" ] \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index e69de29..df993ab 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -0,0 +1,5 @@ +MIT License + +Copyright (c) 2020-2025 Retr0 + +Permission is hereby granted, free of charge, to any person obtaining a copy... \ No newline at end of file diff --git a/build.yaml b/build.yaml index e69de29..2e97257 100644 --- a/build.yaml +++ b/build.yaml @@ -0,0 +1,7 @@ +image: ghcr.io/dein-benutzername/{arch}-addon-foldingathome +squash: false +build_from: + amd64: ghcr.io/hassio-addons/debian-base:7.3.1 + armhf: ghcr.io/hassio-addons/debian-base:7.3.1 + armv7: ghcr.io/hassio-addons/debian-base:7.3.1 + aarch64: ghcr.io/hassio-addons/debian-base:7.3.1 \ No newline at end of file diff --git a/config.yaml b/config.yaml index e69de29..7775e66 100644 --- a/config.yaml +++ b/config.yaml @@ -0,0 +1,27 @@ +name: Folding@home +version: 0.8.0 +slug: foldingathome +description: Run Folding@home to contribute to scientific research +url: https://gitea.deine-url/dein-benutzername/dont-stop-folding +arch: + - amd64 + - armhf + - armv7 + - aarch64 +init: false +ports: + 7396/tcp: 7396 +ports_description: + 7396/tcp: Folding@home Web Interface +map: + - share:rw +options: + user: "" + team: "247478" + passkey: "" + power: "medium" +schema: + user: str? + team: str + passkey: str? + power: list(light|medium|full) \ No newline at end of file diff --git a/readme.md b/readme.md index 8318c86..eff52f9 100644 --- a/readme.md +++ b/readme.md @@ -1 +1,14 @@ -Test \ No newline at end of file +# Folding@home Home Assistant Add-on + +Ein Community-gepflegtes Add-on für Home Assistant, um Folding@home (Version 8.4) auszuführen und zur wissenschaftlichen Forschung beizutragen. + +## Installation +1. Füge dieses Repository in Home Assistant hinzu: `https://gitea.deine-url/dein-benutzername/dont-stop-folding` +2. Installiere das Add-on über den Add-on-Store. +3. Konfiguriere Benutzername, Team-ID (z. B. 247478 für Home Assistant) und andere Einstellungen. + +## Dokumentation +Siehe [DOCS.md](DOCS.md) für Details. + +## Lizenz +MIT License, siehe [LICENSE](LICENSE). \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/cont-init.d/foldingathome.sh b/rootfs/etc/s6-overlay/cont-init.d/foldingathome.sh new file mode 100644 index 0000000..cec3595 --- /dev/null +++ b/rootfs/etc/s6-overlay/cont-init.d/foldingathome.sh @@ -0,0 +1,21 @@ +#!/usr/bin/with-contenv bash +# Importiere Home Assistant-Konfigurationsoptionen +. /opt/hassio-addons/base.sh + +# Konfigurationsverzeichnis +CONFIG_PATH=/data/fahclient +mkdir -p "$CONFIG_PATH" + +# Erstelle config.xml, falls nicht vorhanden +if [ ! -f "$CONFIG_PATH/config.xml" ]; then + cat > "$CONFIG_PATH/config.xml" << EOF + + + + + + + + +EOF +fi \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/dependencies b/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/dependencies new file mode 100644 index 0000000..68e5636 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/dependencies @@ -0,0 +1 @@ +cont-init \ No newline at end of file diff --git a/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/run b/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/run new file mode 100644 index 0000000..45ab86a --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/init-foldingathome/run @@ -0,0 +1,3 @@ +#!/usr/bin/execlineb -P +with-contenv +foreground { /usr/bin/fahclient --config /data/fahclient/config.xml } \ No newline at end of file