#!/bin/sh # Updates /opt/.filetool.lst. FILETOOL_LST="/opt/.filetool.lst" # List of files to add to .filetool.lst. FILES="etc/passwd etc/shadow etc/sudoers etc/group etc/gshadow" # Go through the list of FILES one by one. for FILE in $FILES do # See if FILE is already in .filetool.lst. if ! grep -q $FILE $FILETOOL_LST 2> /dev/null then # If not, then add it. echo $FILE >> $FILETOOL_LST fi done echo "Run filetool.sh -b to backup updated files"