Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Bash by ver ( 7 years ago )
:~$ cat camwatch
#! /bin/sh -e
inotifywait -r -m -e close_write \
    --format "%f" --timefmt "%T" \
    ~/storage/shared/DCIM/Camera \
  | xargs -I# \
    flock -n -E0 -F ~/.sync.lock -c ' \
      echo -n #; \
      date; \
      termux-wake-lock; \
      rsync -va --progress \
          ~/storage/shared/DCIM/Camera \
          10.10.10.1::pub/Camera \
        && termux-notification --content "#" & \
      [ -f ~/storage/shared/DCIM/export/# ] \
        || ( convert ~/storage/shared/DCIM/Camera/# \
            -quality 73% -strip -resize 2304x1728 \
            ~/storage/shared/DCIM/export/# \
          && toot post -m ~/storage/shared/DCIM/export/# \
            --no-color -v public shot ) & \
      wait; \
      termux-wake-unlock; \
      sleep 2; ' \
  2>&1 \
  | tee -a ~/syncer.log

 

Revise this Paste

Your Name: Code Language: