A bit later I discovered that there isn't good support for running sketches as non-root on the Yun yet.
Furthermore to be able to have user owned directories on the SD card, the SD card should be formatted in Linux format. For now I am giving up on running Yafa as a normal user. I'll do things as root for now.
However I want to avoid fetchmail writing in the /root folder, so I want all my fetchmail stuff to reside on the SD card. Because the .fetchmailrc needs specific permissions, I need to format the SD card in linux format anyway:
opkg update opkg install e2fsprogs opkg install mount-utils umount /dev/sda1 mkfs.ext4 /dev/sda1
I didn't succeed in mounting it again. A reboot of the Yun took care of that.
cd /dev/sda1 mkdir arduino cd arduino mkdir fetchmail cd fetchmail touch fetchmail.log touch fetchmailrc chmod 600 fetchmailrc
In fetchtmailrc I have put:
set idfile /mnt/sda1/arduino/fetchmail/fetchids #set logfile /mnt/sda1/arduino/fetchmail/fetchmail.log set pidfile /mnt/sda1/arduino/fetchmail/fetchmail.pid poll pop.gmail.com proto pop3 user "me@yafasomething.com" password "mypassword" mda "/usr/bin/procmail -d %T" ssl sslcertck
I could run fetchmail with the -f option, but it is easier to set an environment variable, which will also make sure the SD card is used (could probably remove the first lines from fetchmailrc) add to /etc/profile the following line (and execute it or log in again):
export FETCHMAILHOME="/mnt/sda1/arduino/fetchmail/"
Note that when running fetchmail with the 2nd line not commented out, the messages do not come on the screen anymore, but come in the log-file. For now I want them to come to standard out.
No comments:
Post a Comment