#!/bin/bash
# /usr/local/bin/box_info
# https://crystalfaeries.net/posix/bin/box_info
# celeste:crystalfaery BOX_INFO 2017-02-05 23:26:26+00:00
# use boxinfo to generate reports in our preferred formats.
# run as root to gather maximum data.
pushd /home/celeste/documents/html/ || exit 1
boxinfo --verbose --format=html 1> /home/crystalfaeries.net/src/.boxinfo.`hostname`.out.txt \
2> /home/crystalfaeries.net/src/.boxinfo.`hostname`.errs.txt || exit 2
mv boxinfo.debug /home/crystalfaeries.net/src/.boxinfo.`hostname`.debug.txt || exit 4
mv boxinfo.html boxinfo.`hostname`.html || exit 3
find . /home/crystalfaeries.net/src -type f -user root -print -exec chown celeste:staff {} \; || exit 5
popd || exit 6
syntax highlighted by Code2HTML, v. 0.9.1