Skip to content

Instantly share code, notes, and snippets.

View stonerl's full-sized avatar

Toni Förster stonerl

  • University of Tübingen
  • 17:27 (UTC +01:00)
View GitHub Profile
@stonerl
stonerl / collectd-get-lantiqdsl-values
Created December 27, 2020 20:12
set of scripts to collect Lantiq DSL line values via collectd-mod-exec
#!/bin/sh
[ -f /lib/functions/lantiq_dsl.sh ] && . /lib/functions/lantiq_dsl.sh || exit 0
HOSTNAME=$(cat /proc/sys/kernel/hostname)
VALUESFILE=/tmp/collectd-lantiqdsl-values
dsl_val() {
echo $(expr "$1" : '.*'$2'=\([-\.[:alnum:]]*\).*')