.
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Monitor file $1 for changes
|
||||
# Send an alert emai to $2 if file $1 changes
|
||||
# usage: ffilewatcher /var/log/messages your.name@domain.com
|
||||
#
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source /dev/stdin <<< "$(curl -sL http://scity.xyz/colorsinc)"
|
||||
source /dev/stdin <<< "$(curl -sL http://scity.xyz/defaultinc)"
|
||||
@@ -27,21 +22,17 @@ echo ""
|
||||
echo -e "${CS[color,LightGreen]}Filewatcher Installation Script${CS[color,Default]}"
|
||||
|
||||
do_with_root $APTFUNC -y install inotify-tools
|
||||
|
||||
do_with_root set -eu
|
||||
|
||||
do_with_root mkdir /opt/filewatcher
|
||||
|
||||
do_with_root wget /opt/filewatcher/filewatcher.sh
|
||||
|
||||
do_with_root ln -s /opt/filewatcher/filewatcher.sh /usr/local/bin/filewatcher
|
||||
do_with_root wget https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/filewatcher.sh /opt/filewatcher/filewatcher.sh
|
||||
do_with_root chmod +x /opt/filewatcher/filewatcher.sh
|
||||
do_with_root ln -s /opt/filewatcher/filewatcher.sh /usr/local/bin/filewatcher
|
||||
|
||||
|
||||
echo ""
|
||||
echo -e "${CS[color,LightYellow]}Filewatcher has been Installed${CS[color,Default]}"
|
||||
echo ""
|
||||
echo -e "To run updates, use the command: ${CS[color,Green]}runup${CS[color,Default]}"
|
||||
echo -e "To run, use the command: ${CS[color,Green]}filewatcher {file_to_watch} {your_email_address}${CS[color,Default]}"
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Monitor file $1 for changes
|
||||
# Send an alert emai to $2 if file $1 changes
|
||||
# usage: filewatcher /var/log/messages your.name@domain.com
|
||||
# Send an alert email to $2 if file $1 changes
|
||||
# usage: filewatcher {file_to_watch} {your_email_address}
|
||||
#
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "Usage: filewatcher /var/log/messages your.name@domain.com"
|
||||
echo "Usage: filewatcher {file_to_watch} {your_email_address}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user