--- /dev/null
+#!/bin/bash
+
+# Copyright (C) 2012 Georgia Public Library Service
+# Chris Sharp <csharp@georgialibraries.org>
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+#
+
+# This is a script to easily access the /openils/conf/oils_sip.xml file,
+# add an account, and copy it over to sip02. For this to work smoothly,
+# you will want to set up an ssh key between this server and the "OTHER_SIP"
+# servers.
+
+EDITOR=vim
+OTHER_SIP='sip02' # list hostnames (as defined in /etc/hosts) to which the altered file needs to be copied (i.e., your other SIP servers)
+
+echo "Creating backup of SIP configuration"
+cp -v /openils/conf/oils_sip.xml /openils/conf/oils_sip.xml.`date +%F`
+su - opensrf -c "$EDITOR /openils/conf/oils_sip.xml"
+for server in $OTHER_SIP;
+ do
+ # back up the existing conf file
+ echo "Creating backup of configuration on $server"
+ ssh root@$server cp -v /openils/conf/oils_sip.xml /openils/conf/oils_sip.xml.`date +%F`
+ echo "Copying new configuration to $server"
+ scp /openils/conf/oils_sip.xml root@$server:/openils/conf/oils_sip.xml
+ echo "Restoring file ownership to opensrf on $server"
+ ssh root@$server "chown -v opensrf:opensrf /openils/conf/oils_sip.*"
+ echo "Done with $server";
+done