| 
									
										
										
										
											2018-11-11 08:19:04 -08:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							| 
									
										
										
										
											2018-09-08 10:38:32 -07:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2019-05-26 11:17:07 -07:00
										 |  |  | # Rsync setup | 
					
						
							| 
									
										
										
										
											2018-09-08 10:38:32 -07:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2018-11-11 09:25:59 -08:00
										 |  |  | set -ex | 
					
						
							| 
									
										
										
										
											2018-09-08 10:38:32 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | [[ $(uname) = Linux ]] || exit 1 | 
					
						
							|  |  |  | [[ $USER = root ]] || exit 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | apt-get --assume-yes install rsync | 
					
						
							|  |  |  | cat > /etc/rsyncd.conf <<-EOF | 
					
						
							|  |  |  | [config] | 
					
						
							|  |  |  | path = /var/snap/solana/current/config | 
					
						
							|  |  |  | hosts allow = * | 
					
						
							|  |  |  | read only = true | 
					
						
							|  |  |  | EOF | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | systemctl enable rsync | 
					
						
							|  |  |  | systemctl start rsync | 
					
						
							|  |  |  | 
 |