From 729835fa992776377c93c723aea86252f79ec52b Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sat, 3 Oct 2026 00:16:58 -0400 Subject: [PATCH] Add MIT license and .gitignore; use public Gitea URLs; download hwmonDaemon before test run instead of exec --- .gitignore | 11 +++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 4 ++-- freshStart.sh | 9 ++++++--- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9bde5e --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Local environment / secrets +.env +*.log +*.bak +*.swp +.DS_Store + +# AI assistant notes (kept locally, not published) +Claude.md +CLAUDE.md +.claude/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6693f89 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024-2026 Jared Vititoe + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 65fc875..4fdf250 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ chmod +x freshStart.sh ``` or if you want to run instantly without downloading (recommended) ```bash -curl -s http://10.10.10.63:3000/LotusGuild/freshStartScript/raw/branch/main/freshStart.sh | bash +curl -s https://code.lotusguild.org/LotusGuild/freshStartScript/raw/branch/main/freshStart.sh | bash ``` @@ -89,7 +89,7 @@ systemctl status hwmon.timer Test hwmonDaemon with dry-run: ```bash -/usr/bin/env python3 -c "import urllib.request; exec(urllib.request.urlopen('http://10.10.10.63:3000/LotusGuild/hwmonDaemon/raw/branch/main/hwmonDaemon.py').read().decode('utf-8'))" --dry-run +/usr/bin/env python3 -c "import urllib.request; exec(urllib.request.urlopen('https://code.lotusguild.org/LotusGuild/hwmonDaemon/raw/branch/main/hwmonDaemon.py').read().decode('utf-8'))" --dry-run ``` Check if API key is loaded: diff --git a/freshStart.sh b/freshStart.sh index b5d91f3..0cfb594 100644 --- a/freshStart.sh +++ b/freshStart.sh @@ -282,12 +282,12 @@ echo "Installing hwmon daemon..." # Download hwmon service files with error handling echo "Downloading hwmon service files..." -if ! curl --max-time 30 --retry 3 -o /etc/systemd/system/hwmon.service http://10.10.10.63:3000/LotusGuild/hwmonDaemon/raw/branch/main/hwmon.service; then +if ! curl --max-time 30 --retry 3 -o /etc/systemd/system/hwmon.service https://code.lotusguild.org/LotusGuild/hwmonDaemon/raw/branch/main/hwmon.service; then echo "ERROR: Failed to download hwmon.service" exit 1 fi -if ! curl --max-time 30 --retry 3 -o /etc/systemd/system/hwmon.timer http://10.10.10.63:3000/LotusGuild/hwmonDaemon/raw/branch/main/hwmon.timer; then +if ! curl --max-time 30 --retry 3 -o /etc/systemd/system/hwmon.timer https://code.lotusguild.org/LotusGuild/hwmonDaemon/raw/branch/main/hwmon.timer; then echo "ERROR: Failed to download hwmon.timer" exit 1 fi @@ -437,9 +437,12 @@ fi # Test hwmon with error handling echo "Testing hwmon dry-run..." -if ! /usr/bin/env python3 -c "import urllib.request; exec(urllib.request.urlopen('http://10.10.10.63:3000/LotusGuild/hwmonDaemon/raw/branch/main/hwmonDaemon.py').read().decode('utf-8'))" --dry-run; then +HWMON_TMP=$(mktemp) +if ! curl -fsSL --max-time 30 -o "$HWMON_TMP" https://code.lotusguild.org/LotusGuild/hwmonDaemon/raw/branch/main/hwmonDaemon.py \ + || ! /usr/bin/env python3 "$HWMON_TMP" --dry-run; then echo "WARNING: hwmon dry-run test failed, but services are installed" fi +rm -f "$HWMON_TMP" # Disable cleanup trap on successful completion trap - ERR