Arch Attempt
This community Arch AMI worked: arch-linux-x64 (ami-2e37c747)
...until I tried to reboot it :(
This looks like a decent dns service: freedns.afraid.org
Trying this one: ami-0456b66d (i386)
pacman -Syu
useradd $u
passwd $u (I used the cookie one...)
mkdir /home/$u
chown $u /home/$u
pacman -S sudo
vim /etc/sudoers
pacman -Syu openjdk6
pacman-db-upgrade
pacman -Syu openjdk6
See Also:
Example AMI Attempt (Amazon linux with yum)
Already has java.
sudo yum install screen -y
sudo yum install mutt -y
sudo yum install tree -y
java -Xmx1024m -jar sat.jar | tee output.txt
SCREEN
screen -S SESSIONNAME
screen -list (works great from inside session)
screen -r SESSIONNAME
MUTT
Woah. So, mutt has some weird ass interactive mode that I never even noticed until I forgot to pipe cat to it! Wow. Anyway.
cat | mutt -s test2 EMAIL@gmail.com
cat output.txt | mutt -s "Sat Results" EMAIL@gmail.com
-a for attachment, -i for body, -s for subject, however if you use -i for the body and dont use cat, mutt still opens its stuipd interactive mode. And it still creates a "sent" file in the home folder. Linking /dev/null to /home/$USER/sent did not work.
echo "set copy = no" > ~/.muttrc
cat /home/ec2-user/sat/output.txt | mutt -s "Current Sat Results" EMAIL@gmail.com
CRON
Hand edit mode:
export EDITOR=vim
crontab -e
Easier:
crontab -
0 * * * * cat /home/ec2-user/sat/output.txt | mutt -s "Current Sat Results" EMAIL@gmail.com
http://adminschoice.com/crontab-quick-reference

0 comments:
Post a Comment