Skip to content

Commit ce1ecca

Browse files
got email working
1 parent 773e094 commit ce1ecca

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bin/notify

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
cd "$(dirname "${BASH_SOURCE[0]}")"
33
source .config
44
cd $proj_dir
5+
6+
#gather input
7+
[ $# -ge 1 -a -f "$1" ] && input="$1" || input=$(cat)
8+
printf "Subject: UPDATE: there are new files\n\n$input" | sendmail ${email_user}@${email_host}

config/example.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ ignore_hidden=true
66
remote_host=''
77
remote_user=''
88
remote_pass=''
9+
10+
###email info (who is receiving)###
11+
email_user='you'
12+
email_host='example.com'

0 commit comments

Comments
 (0)