Add MIT license and .gitignore; use public Gitea URLs; download hwmonDaemon before test run instead of exec
Lint / Shell (shellcheck) (push) Successful in 7s
Lint / Shell (shellcheck) (push) Successful in 7s
This commit is contained in:
+11
@@ -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/
|
||||
@@ -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.
|
||||
@@ -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:
|
||||
|
||||
+6
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user