#gluon-ffmz-keys
##:unlock:
##Git
# $ ssh-keygen -t rsa -b 4096
Add the public key to the Vollhorst User on GitHub ssh keys, named after your Gateway
Vollhorst is in the AutoCRON Group, members are allowed to push here.
# Host github_vollhorst
# User git
# Hostname github.com
# PreferredAuthentications publickey
# IdentityFile ~/.ssh/github_vollhorst_rsa
# $ ssh github_vollhorst
# Hi Vollhorst! You've successfully authenticated, but GitHub does not provide shell access.
# Connection to github.com closed.
# $ git clone ssh://github_vollhorst/Freifunk-Mainz/gluon-ffmz-keys /etc/fastd/mainzVPN/peers
##Sync
# #!/bin/bash
# # Simple script to update fastd peers from git upstream
# # and only send HUP to fastd when changes happend.
#
# # SET YOUR GATEWAY NAME HERE
# GW_NAME="awesome gateway"
#
# # CONFIGURE THIS TO YOUR PEER DIRECTORY
# FASTD_PEERS=/etc/fastd/mainz_meshVPN/peers
#
# function getCurrentVersion() {
# # Get hash from latest revision
# git log --format=format:%H -1
# }
#
# function getDate() {
# # Get timestamp
# date "+%s"
# }
#
# cd $FASTD_PEERS
#
# # Get current version hash
# GIT_REVISION=$(getCurrentVersion)
#
# # Automagically commit local changes
# # This preserves local changes
# git commit -m "CRON $GW_NAME: auto commit $(getDate)"
#
# # Pull latest changes from upstream
# git fetch
# git merge origin/master -m "CRON $GW_NAME: auto merge $(getDate)"
#
# # Get new version hash
# GIT_NEW_REVISION=$(getCurrentVersion)
#
# if [ $GIT_REVISION != $GIT_NEW_REVISION ]
# then
# # Version has changed we need to update
# echo "Reload fastd peers"
# kill -HUP $(pidof fastd)
# git push -u origin master
# fi
# $ chmod +x `~/bin/autoupdate_fastd_keys.sh`
# */20 * * * * $HOME/bin/autoupdate_fastd_keys.sh >> /var/log/fastd/autoupdate_fastd_keys.cron 2>&1
##Usage
to upload keys (and therefore sync to the other gateways) from /etc/fastd/mainzVPN/peers/
just add them:
# $ git add freifunk-000011112222
to delete keys (and therefore delete via sync from the other gateways) you have to delete them from git:
# $ git rm freifunk-000011112222