Create run.sh
This commit is contained in:
		
							
								
								
									
										26
									
								
								run.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								run.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| cd /root | ||||
|  | ||||
| #updates | ||||
| apt update && apt upgrade -y | ||||
| apt install -y unattended-upgrades apt-config-auto-update | ||||
|  | ||||
| #docker | ||||
| apt install -y curl | ||||
| curl -fsSL https://get.docker.com -o get-docker.sh | ||||
| sh ./get-docker.sh | ||||
| touch docker-compose.yml | ||||
|  | ||||
| #update script | ||||
| cat >> update.sh << 'END' | ||||
| #!/bin/bash | ||||
|  | ||||
| cd /root | ||||
| docker compose pull | ||||
| docker compose up --detach --force-recreate --pull always | ||||
| docker image prune -f | ||||
| END | ||||
|  | ||||
| chmod +x update.sh | ||||
| ln -s /root/update.sh /etc/cron.weekly/update_docker | ||||
		Reference in New Issue
	
	Block a user
	 Felix Schulze
					Felix Schulze