User Tools

Site Tools


projects:transcend-wifi-sd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
projects:transcend-wifi-sd [2017/02/16 23:50] informaticprojects:transcend-wifi-sd [2017/10/31 19:27] – [Transcend] systemd! ar
Line 8: Line 8:
 Hacked Transcend WiFi SD Card is used to publish photos taken on our local DSLR to a [[http://camera.waw.hackerspace.pl|HTTP-accessible gallery]]. Hacked Transcend WiFi SD Card is used to publish photos taken on our local DSLR to a [[http://camera.waw.hackerspace.pl|HTTP-accessible gallery]].
  
-Photos are gathered from the camera with a simple oneliner:+Photos are downloaded from the camera with a simple systemd timer unit
 <code> <code>
-# yes, we have f*king SD card in local DNS zone +[Unit] 
-while true; do ping -n -c 1 transcend.waw.hackerspace.pl>/dev/null && lftp -e "mirror DCIM/ /storage/media/transcend; quit" transcend.waw.hackerspace.pl; sleep 5done+Description=Timer trigger for camera wifi downloader 
 + 
 +[Install] 
 +WantedBy=timers.target 
 + 
 +[Timer] 
 +OnUnitActiveSec=10 
 +OnBootSec=15 
 +AccuracySec=1 
 +Persistent=no 
 +RemainAfterElapse=no 
 +</code> 
 +and service unit 
 +<code> 
 +[Unit] 
 +Description=camera wifi downloader 
 + 
 +[Service] 
 +User=cameraget 
 +Group=cameraget 
 +Type=oneshot 
 +ExecStart=/bin/sleep 1 
 +ExecStart=/bin/ping -n -c 1 transcend.waw.hackerspace.pl 
 +ExecStart=-/usr/bin/lftp -e "mirror --ignore-time DCIM/ /data/transcend;quit" transcend.waw.hackerspace.pl 
 +ExecStart=/bin/bash -c "cd /data/sigalsource venv/bin/activatesigal build"
 </code> </code>
  
projects/transcend-wifi-sd.txt · Last modified: 2023/03/20 00:26 by sdomi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki