The Following 11 Users Say Thank You to magick777 For This Useful Post: | ||
![]() |
2013-06-12
, 22:28
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#3
|
/media/mmc1/DCIM IN_CLOSE_WRITE nice -n 19 convert $@/$# -resize 640x /media/mmc1/vga/$# /media/mmc1/vga IN_CLOSE_WRITE curl -T $@/$# http://<user:pass>@files.memotoo.com/webFolder/DCIM/
/media/mmc1/DCIM IN_CLOSE_WRITE nice -n 19 convert $@/$# -resize 640x /media/mmc1/vga/$# /media/mmc1/vga IN_CLOSE_WRITE run-standalone.sh mailcmd -s $# -a $@/$# user@email.host </dev/null
![]() |
2013-06-13
, 05:45
|
Posts: 58 |
Thanked: 134 times |
Joined on Dec 2012
@ Vilnius, Lithuania
|
#4
|
![]() |
2013-06-13
, 08:39
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#5
|
Nice thread.
What about when you're offline? How to queue taken photos and upload only when connected through WiFi?
The Following 4 Users Say Thank You to magick777 For This Useful Post: | ||
![]() |
2013-06-13
, 08:58
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#6
|
![]() |
2013-06-13
, 09:13
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#7
|
magick777, thank you for your wonderful research. I'm curious, maybe it's worth to put incron into Maemo's repos?
/Estel
![]() |
2013-06-13
, 09:18
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#8
|
The Following User Says Thank You to Estel For This Useful Post: | ||
![]() |
2013-06-13
, 10:48
|
Posts: 167 |
Thanked: 204 times |
Joined on Jul 2010
|
#9
|
![]() |
2013-06-13
, 11:04
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#10
|
The Following User Says Thank You to Estel For This Useful Post: | ||
![]() |
Tags |
incron, inotify |
Thread Tools | |
|
This led me to multiple ways of using inotify on the N900; within the maemo repositories we already have inotify-tools, which provides inotifywait, useful for manual command-line work. However, rather than reinvent the wheel, debian provides inoticoming for monitoring a given 'incoming' directory and running a command when new files arrive. It might be nice to see this packaged for maemo.
So, then I went digging a little further and found incron, which provides a daemon to allow us to monitor multiple files or directories for filesystem events, with a crontab-like interface. This would seem to be ideal for handling photo uploads with or without an SD card present, and also perhaps for a range of other automated backup/file transfer applications. Hence this new thread; I want to discuss getting incron working on the N900 and the possible use cases for doing so. As it stands, incron is not in the maemo repositories, but the squeeze version installs happily provided that you first satisfy its dependency on 'adduser'.
Steps to install incron:
- install adduser, using apt-get or your favourite package manager
- download the incron deb with wget, install with it dpkg -i
- edit /etc/incron.allow to include user, root, or both
- create a startup script as /etc/event.d/incron
- reboot and verify that incrond is running as expected
- when it is, edit your incrontab to suit your use case
So, if our use case is that of uploading photos, we can do something like