1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/sh
set -e
FSVS_BIN=$(which fsvs)
FSVS_OPTS="-ostop_change=true -odir_exclude_mtime=true -ofilter=mtime,text,owner,mode,group,new,deleted"
if ! $FSVS_BIN st / $FSVS_OPTS;then
echo "fsvs has detected changes in monitored directories."
echo ""
echo "changed files:"
echo "---------------------------------------------------"
echo ""
$FSVS_BIN st /
echo ""
echo "user last logged in:"
echo "---------------------------------------------------"
echo ""
last -n 3
echo ""
echo "diff of the files changed:"
echo "----------------------------------------------------"
echo ""
$FSVS_BIN diff /
fi
|