#!/bin/sh # # Collect sytem information and pass it on to the sitesummary server # using HTTP put. # https://svn.revolutionlinux.com/MILLE/XTERM/trunk/mille-xterm-getltscfg/src/getltscfg.script set -e serverurls="http://localhost/cgi-bin/sitesummary-collector.cgi" fragdirs="/usr/lib/sitesummary/collect.d \ /etc/sitesummary/collect.d" # Make sure to store files in a ramfs backed # storage area on diskless clients, so use /tmp/. tmpdir=/tmp/sitesummary-$$ # Read the package default [ -f /usr/share/sitesummary/config ] && . /usr/share/sitesummary/config for confdir in \ /usr/share/sitesummary/config.d \ /etc/sitesummary/config.d do [ -d $confdir ] || continue for config in $confdir/* ; do [ -f $conf ] && . $conf done done mkdir $tmpdir && cd $tmpdir for fragdir in $fragdirs ; do [ -d $fragdir ] || continue for frag in $fragdir/*; do [ -x $frag ] && $frag done done tar zcf $tmpdir.tar.gz . for url in $serverurls ; do #WGETOPTS="--no-check-certificate" wget $WGETOPTS --post-file $tmpdir.tar.gz -O $tmpdir.result $url done