Skip to content

Instantly share code, notes, and snippets.

@thefinn93
Created May 24, 2012 20:04
Show Gist options
  • Save thefinn93/2783893 to your computer and use it in GitHub Desktop.
Save thefinn93/2783893 to your computer and use it in GitHub Desktop.
CJDNS map
#! /bin/bash
LOGFILE="/var/log/cjdnsmap.log"
CJDADMIN_IP="127.0.0.1"
CJDADMIN_PORT="11234"
CJDADMIN_PASS="hax"
date > $LOGFILE
/home/finn/cjdnsmap/cjdnsmap.py $CJDADMIN_IP $CJDADMIN_PORT $CJDADMIN_PASS /home/finn/cjdnsmap/map.png >> $LOGFILE
cp -v /home/finn/cjdnsmap/map.png /var/www/map.png >> $LOGFILE
/home/finn/cjdnsmap/cjdnsmap.py $CJDADMIN_IP $CJDADMIN_PORT $CJDADMIN_PASS /home/finn/cjdnsmap/map.svg >> $LOGFILE
cp -v /home/finn/cjdnsmap/map.svg /var/www/map.svg >> $LOGFILE
echo "rsyncing them to thefinn93.com" >> $LOGFILE
rsync -v --rsh="ssh -p2200" /home/finn/cjdnsmap/map.png [email protected]:/var/www/static/cjdns/map.png/map.png >> $LOGFILE &
rsync -v --rsh="ssh -p2200" /home/finn/cjdnsmap/map.svg [email protected]:/var/www/static/cjdns/map/map.svg >> $LOGFILE &
date >> $LOGFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment