File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ USER=' josh' 
4+ 
5+ #  Ensure script is run as root
6+ if  [ " $( id -u) "   !=  " 0"   ];  then 
7+   echo  " Script must be run as root." 
8+   exit  1
9+ fi 
10+ 
11+ #  Ensure Ubuntu One has already been signed into and synced.
12+ if  [ !  -d  " /home/$USER /Ubuntu\ One"   ];  then 
13+   echo  " Please login to Ubuntu One and start syncing first" 
14+   echo  " Then rerun this script." 
15+   exit  1
16+ fi 
17+ 
18+ apt-get -y update &&  apt-get -y upgrade
19+ apt-get -y install kate subversion eclipse powertop git-core gitosis flashplugin-nonfree
20+ ln -s /home/$USER /Ubuntu\  One/programming/ /home/$USER /programming
21+ 
22+ # Link Documents to the Documents folder in 
23+ rm -rf /home/josh/Documents
24+ ln -s /home/josh/Ubuntu\  One/Documents/ /home/josh/Documents
25+ 
26+ # Install Chrome
27+ echo  " deb http://dl.google.com/linux/deb/ unstable non-free main"   |  sudo tee -a /etc/apt/sources.list >  /dev/null
28+ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub |  sudo apt-key add -
29+ sudo apt-get update &&  sudo apt-get install google-chrome-unstable
30+ 
31+ # Install Skype
32+ echo  " deb http://download.skype.com/linux/repos/debian/ stable non-free #Skype"   |  sudo tee -a /etc/apt/sources.list >  /dev/null
33+ gpg --keyserver pgp.mit.edu --recv-keys 0xd66b746e &&  gpg --export --armor 0xd66b746e  |  sudo apt-key add -
34+ sudo apt-get update &&  sudo apt-get install skype
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ HOSTS=" nang.kicks-ass.net" 
4+ 
5+ COUNT=4
6+ echo  " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"   >>  /var/log/rsyncFreeNAS
7+ echo  " Starting rsync attempt at ` date` "   >>  /var/log/rsyncFreeNAS
8+ for  myHost  in  $HOSTS 
9+ do 
10+   count=$( ping -c $COUNT  $myHost  |  grep ' received'   |  awk -F' ,'   ' { print $2 }'   |  awk ' { print $1 }' ) 
11+   if  [ $count  -eq  0 ];  then 
12+     #  100% failed 
13+     echo  " Host : $myHost  is down (ping failed) at $( date) "   >>  /var/log/rsyncFreeNAS
14+   else 
15+     echo  " Host : $myHost  is up at $( date) "   >>  /var/log/rsyncFreeNAS
16+     # rsync -aP /home/josh/programming/* josh@$HOSTS:home >> /var/log/rsyncFreeNAS 
17+     rsync -aHvz -e ssh /home/josh/programming/*  root@192.168.1.250:/mnt/storage/Config/home >>  /var/log/rsyncFreeNAS 
18+   fi 
19+ done 
20+ echo  " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"   >>  /var/log/rsyncFreeNAS
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments