Compare commits

..

5 Commits

Author SHA1 Message Date
henrygd
f9a39c6004 add noindex meta tag to html (#1218) 2025-09-30 19:16:15 -04:00
henrygd
f21a6d15fe update agent install script to use get.beszel.dev/latest-version (#1212) 2025-09-29 13:37:51 -04:00
Timothy Pillow
bf38716095 Modify GPU usage section in readme (#1216)
Updated GPU metrics to include Intel support and removed temperature. Synced section as currently written in https://beszel.dev/guide/what-is-beszel#supported-metrics
2025-09-29 12:27:20 -04:00
henrygd
45816e7de6 agent install script: refactor mirror handling (#1212)
- add --mirror flag
- use mirror url for api.github.com
- remove prompt confirmation for mirror usage
2025-09-28 13:49:41 -04:00
evrial
2a6946906e Fixed OpenWRT agent restarter logic (#1210)
* Fixed OpenWRT restarter logic

* Update update.go
2025-09-26 12:15:42 -04:00
4 changed files with 16 additions and 20 deletions

View File

@@ -40,11 +40,12 @@ func (o *openRCRestarter) Restart() error {
type openWRTRestarter struct{ cmd string }
func (w *openWRTRestarter) Restart() error {
if err := exec.Command(w.cmd, "running", "beszel-agent").Run(); err != nil {
// https://openwrt.org/docs/guide-user/base-system/managing_services?s[]=service
if err := exec.Command("/etc/init.d/beszel-agent", "running").Run(); err != nil {
return nil
}
ghupdate.ColorPrint(ghupdate.ColorYellow, "Restarting beszel-agent via procd…")
return exec.Command(w.cmd, "restart", "beszel-agent").Run()
return exec.Command("/etc/init.d/beszel-agent", "restart").Run()
}
type freeBSDRestarter struct{ cmd string }
@@ -64,11 +65,13 @@ func detectRestarter() restarter {
if path, err := exec.LookPath("rc-service"); err == nil {
return &openRCRestarter{cmd: path}
}
if path, err := exec.LookPath("procd"); err == nil {
return &openWRTRestarter{cmd: path}
}
if path, err := exec.LookPath("service"); err == nil {
if runtime.GOOS == "freebsd" {
return &freeBSDRestarter{cmd: path}
}
return &openWRTRestarter{cmd: path}
}
return nil
}

View File

@@ -5,6 +5,7 @@
<link rel="manifest" href="./static/manifest.json" />
<link rel="icon" type="image/svg+xml" href="./static/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<meta name="robots" content="noindex, nofollow" />
<title>Beszel</title>
<script>
globalThis.BESZEL = {

View File

@@ -48,7 +48,7 @@ The [quick start guide](https://beszel.dev/guide/getting-started) and other docu
- **Network usage** - Host system and containers.
- **Load average** - Host system.
- **Temperature** - Host system sensors.
- **GPU usage / temperature / power draw** - Nvidia and AMD only. Must use binary agent.
- **GPU usage / power draw** - Nvidia, AMD, and Intel.
- **Battery** - Host system battery charge.
## Help and discussion

View File

@@ -212,7 +212,6 @@ detect_mips_endianness() {
PORT=45876
UNINSTALL=false
GITHUB_URL="https://github.com"
GITHUB_API_URL="https://api.github.com" # not blocked in China currently
GITHUB_PROXY_URL=""
KEY=""
TOKEN=""
@@ -234,7 +233,7 @@ case "$1" in
printf " -u : Uninstall Beszel Agent\n"
printf " --auto-update [VALUE] : Control automatic daily updates\n"
printf " VALUE can be true (enable) or false (disable). If not specified, will prompt.\n"
printf " --china-mirrors [URL] : Use GitHub proxy to resolve network timeout issues in mainland China\n"
printf " --mirror [URL] : Use GitHub proxy to resolve network timeout issues in mainland China\n"
printf " URL: optional custom proxy URL (default: https://gh.beszel.dev)\n"
printf " -h, --help : Display this help message\n"
exit 0
@@ -293,7 +292,7 @@ while [ $# -gt 0 ]; do
-u)
UNINSTALL=true
;;
--china-mirrors*)
--mirror* | --china-mirrors*)
# Check if there's a value after the = sign
if echo "$1" | grep -q "="; then
# Extract the value after =
@@ -452,18 +451,6 @@ if [ "$UNINSTALL" = true ]; then
exit 0
fi
# Confirm the use of GitHub mirrors for downloads
if [ -n "$GITHUB_PROXY_URL" ]; then
printf "\nConfirm use of GitHub mirror (%s) for downloading beszel-agent?\nThis helps to install properly in mainland China. (Y/n): " "$GITHUB_PROXY_URL"
read USE_MIRROR
USE_MIRROR=${USE_MIRROR:-Y}
if [ "$USE_MIRROR" = "Y" ] || [ "$USE_MIRROR" = "y" ]; then
echo "Using GitHub Mirror ($GITHUB_PROXY_URL) for downloads..."
else
GITHUB_URL="https://github.com"
fi
fi
# Check if a package is installed
package_installed() {
command -v "$1" >/dev/null 2>&1
@@ -608,7 +595,12 @@ FILE_NAME="beszel-agent_${OS}_${ARCH}.tar.gz"
# Determine version to install
if [ "$VERSION" = "latest" ]; then
INSTALL_VERSION=$(curl -s "$GITHUB_API_URL""/repos/henrygd/beszel/releases/latest" | grep -o '"tag_name": "v[^"]*"' | cut -d'"' -f4 | tr -d 'v')
INSTALL_VERSION=$(curl -s "https://get.beszel.dev/latest-version")
if [ -z "$INSTALL_VERSION" ]; then
# Fallback to GitHub API
API_RELEASE_URL="https://api.github.com/repos/henrygd/beszel/releases/latest"
INSTALL_VERSION=$(curl -s "$API_RELEASE_URL" | grep -o '"tag_name": "v[^"]*"' | cut -d'"' -f4 | tr -d 'v')
fi
if [ -z "$INSTALL_VERSION" ]; then
echo "Failed to get latest version"
exit 1