Created
April 16, 2022 07:06
-
-
Save Gowee/c50ff5d3a4c03be4ed1b4ade94fdc240 to your computer and use it in GitHub Desktop.
Openwrt get telegraf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eux | |
cd /tmp | |
filename=$(opkg update && opkg info telegraf | grep "Filename:" | cut -d' ' -f2) | |
repo=$(cat /etc/opkg/distfeeds.conf | grep "openwrt_packages" | cut -d' ' -f3) | |
url="$repo/$filename" | |
wget -q $url | |
tar xOzf $filename ./data.tar.gz | tar xOzf - ./usr/bin/telegraf > telegraf | |
chmod +x telegraf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment