- # eg. rlu -opts frodo /testpath
- # relative paths will expanded with readlink -f.
- # useful for selectively sending dirs which have been synced with unison,
- # where the path is the same on both hosts.
- opts=("${@:1:$#-2}") # 1 to last -2
- path="${@:$#}" # last
- host="${@:$#-1:1}" # last -1
- if [[ $path == .* ]]; then
- path=$(readlink -f $path)
- fi
- # rync here uses checksum instead of time so we don't mess with
- # unison relying on time as much. g is for group, same reason
- # to keep up with unison.
- s rsync -rlpchviog --relative "${opts[@]}" "$path" "root@$host:/";
-}
-
+ # eg. rlu -opts frodo /testpath
+ # relative paths will expanded with readlink -f.
+ # useful for selectively sending dirs which have been synced with unison,
+ # where the path is the same on both hosts.
+ opts=("${@:1:$#-2}") # 1 to last -2
+ path="${@:$#}" # last
+ host="${@:$#-1:1}" # last -1
+ if [[ $path == .* ]]; then
+ path=$(readlink -f $path)
+ fi
+ # rync here uses checksum instead of time so we dont mess with
+ # unison relying on time as much. g is for group, same reason
+ # to keep up with unison.
+ s rsync -rlpchviog --relative "${opts[@]}" "$path" "root@$host:/";
+}
+
+# only run on MAIL_HOST. simpler to keep this on one system.
+r2eadd() { # usage: name url
+ # initial setup of rss2email:
+ # r2e new r2e@iankelling.org
+ # that initializes files, and sets default email.
+ # symlink to the config doesnt work, so I copied it to /p/c
+ # and then use cli option to specify explicit path.
+ # Only option changed from default config is to set
+ # force-from = True
+ #
+ # or else for a few feeds, the from address is set by the feed, and
+ # if I fail delivery, then I send a bounce message to that from
+ # address, which makes me be a spammer.
+
+ r2e add $1 "$2" $1@r2e.iankelling.org
+ # get up to date and dont send old entries now:
+ r2e run --no-send $1
+}
+r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }