PageRenderTime 183ms CodeModel.GetById 161ms app.highlight 3ms RepoModel.GetById 17ms app.codeStats 1ms

/silverlining/server-sync-scripts/update-from-server.sh

https://bitbucket.org/ianb/silverlining/
Shell | 28 lines | 24 code | 3 blank | 1 comment | 3 complexity | c7ab1c8750d70e8d17759ddd57fcbd81 MD5 | raw file
 1#!/bin/sh
 2
 3SERVER="$1"
 4if [ "$SERVER" = "" ] ; then
 5    echo "You must give a server to sync from"
 6    exit 2
 7fi
 8
 9echo rsync -r root@$SERVER:/usr/local/share/silverlining/lib/silversupport/ ../../silversupport/
10rsync -r root@$SERVER:/usr/local/share/silverlining/lib/silversupport/ ../../silversupport/
11echo rsync -r root@$SERVER:/usr/local/share/silverlining/mgr-scripts/ ../mgr-scripts/
12rsync -r root@$SERVER:/usr/local/share/silverlining/mgr-scripts/ ../mgr-scripts/
13echo rsync -r root@$SERVER:/etc/apache2/sites-enabled .
14rsync -r root@$SERVER:/etc/apache2/sites-enabled .
15echo rsync -r root@$SERVER:/root .
16rsync -r root@$SERVER:/root .
17echo rsync root@$SERVER:/var/www/README.txt www-README.txt
18rsync root@$SERVER:/var/www/README.txt www-README.txt
19echo rsync root@$SERVER:/etc/init.d/silverlining-setup silverlining-setup
20rsync root@$SERVER:/etc/init.d/silverlining-setup silverlining-setup
21echo ssh root@$SERVER '"dpkg-query -W" >' dpkg-query.txt
22ssh root@$SERVER "dpkg-query -W" > dpkg-query.txt
23
24for F in .bash_history .debtags .joe_state .lesshst .psql_history .ssh ; do
25    if [ -e root/$F ] ; then
26        rm -rf root/$F
27    fi
28done