PageRenderTime 145ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): GPL-2.0
  1. #!/bin/sh
  2. SERVER="$1"
  3. if [ "$SERVER" = "" ] ; then
  4. echo "You must give a server to sync from"
  5. exit 2
  6. fi
  7. echo rsync -r root@$SERVER:/usr/local/share/silverlining/lib/silversupport/ ../../silversupport/
  8. rsync -r root@$SERVER:/usr/local/share/silverlining/lib/silversupport/ ../../silversupport/
  9. echo rsync -r root@$SERVER:/usr/local/share/silverlining/mgr-scripts/ ../mgr-scripts/
  10. rsync -r root@$SERVER:/usr/local/share/silverlining/mgr-scripts/ ../mgr-scripts/
  11. echo rsync -r root@$SERVER:/etc/apache2/sites-enabled .
  12. rsync -r root@$SERVER:/etc/apache2/sites-enabled .
  13. echo rsync -r root@$SERVER:/root .
  14. rsync -r root@$SERVER:/root .
  15. echo rsync root@$SERVER:/var/www/README.txt www-README.txt
  16. rsync root@$SERVER:/var/www/README.txt www-README.txt
  17. echo rsync root@$SERVER:/etc/init.d/silverlining-setup silverlining-setup
  18. rsync root@$SERVER:/etc/init.d/silverlining-setup silverlining-setup
  19. echo ssh root@$SERVER '"dpkg-query -W" >' dpkg-query.txt
  20. ssh root@$SERVER "dpkg-query -W" > dpkg-query.txt
  21. for F in .bash_history .debtags .joe_state .lesshst .psql_history .ssh ; do
  22. if [ -e root/$F ] ; then
  23. rm -rf root/$F
  24. fi
  25. done