Skip to content

Commit

Permalink
add license and author
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Feb 8, 2011
1 parent dff892e commit fc391ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
12 changes: 5 additions & 7 deletions munin/log-single-line.sh
@@ -1,19 +1,17 @@
#!/bin/sh
#Logs a single line into the log file passed as script parameter
# adds timestamp to the logview openformat lines
# Logs a single line into the log file passed as script parameter
# and adds timestamp to the logview openformat lines
#
# License: http://www.gnu.org/licenses/agpl.html AGPL
# Author: Christian Weiske <cweiske@cweiske.de>

file="$1"
if [ "x$file" = "x" ]; then
echo Please pass a file name to log the line into
exit 1
fi

#Beispielausgabe USB-WDE1:
# $1;1;;13,8;22,7;22,6;17,8;22,2;21,2;22,9;;59;35;38;49;38;40;35;;;;;;;0
# Doku des Formats in 92030_USB_WDE1_V1.0_UM.pdf bei elv.de verfügbar
# Format ist "Logview openformat"
# http://www.logview.info/cms/d_formatbeschreibung.phtml

while read -r line
do
beginning=`echo "$line"|cut -b 1-3`
Expand Down
9 changes: 7 additions & 2 deletions munin/usb-wde1-log-last.sh
@@ -1,9 +1,14 @@
#!/bin/sh
# logs the last line. usable via nohup on the server
#
# run this script as follows:
# $ nohup ./usb-wde1-log-last.sh &
#
# License: http://www.gnu.org/licenses/agpl.html AGPL
# Author: Christian Weiske <cweiske@cweiske.de>
#
# FIXME: send RESET or INIT and M2
# FIXME: use absolute path for log-single-line.sh
#
# run command: nohup ./usb-wde1-log-last.sh &
#
socat /dev/ttyUSB0,b9600 STDOUT\
| ./log-single-line.sh /tmp/usb-wde1-last
12 changes: 12 additions & 0 deletions munin/usb-wde1_
Expand Up @@ -26,6 +26,11 @@ usb-wde1 - Munin plugin to report usb-wde1 temperature and humidity data
#%# family=manual
#%# capabilities=autoconf suggest
=head1 AUTHOR and LICENSE
License: http://www.gnu.org/licenses/agpl.html AGPL
Author: Christian Weiske <cweiske@cweiske.de>
=cut

TYPE=`basename $0 | sed 's/^.*_//g'`
Expand Down Expand Up @@ -91,6 +96,13 @@ if [ "$1" = "config" ]; then
exit 0
fi

#Beispielausgabe USB-WDE1:
# $1;1;;13,8;22,7;22,6;17,8;22,2;21,2;22,9;;59;35;38;49;38;40;35;;;;;;;0
# Doku des Formats in 92030_USB_WDE1_V1.0_UM.pdf bei elv.de verfügbar
# Format ist "Logview openformat"
# http://www.logview.info/cms/d_formatbeschreibung.phtml


#split by semicolons
OLDIFS="$IFS"
IFS=";"
Expand Down

0 comments on commit fc391ab

Please sign in to comment.