#!/bin/sh # # push-changes # John Simpson 2004-08-25 # # pushes new "data" files to slave tinydns servers using SSH # expects slaves to have the right forced command attached to this key # # 2007-09-11 jms1 - changing format of server list to allow different # userid's on each slave server # ############################################################################### # # Copyright (C) 2004,2007 John Simpson. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # or visit http://www.gnu.org/licenses/gpl.txt # ############################################################################### # list of child nameserver user@IP combos, separated by space # i.e. "user@1.2.3.4 user@5.6.7.8 user@9.10.11.12" SERVERS="dnsslave@999.999.999.999 dnsslave@888.888.888.888" # keep any SSH agent from messing things up unset SSH_AUTH_SOCK for server in $SERVERS do echo "/---- Start of messages from $server" cat data | env - PATH="/usr/bin:/bin" ssh \ -i id_dsa_dnsupdate $server zzz echo "\\---- End of messages from $server" done