server configs
This commit is contained in:
		
							parent
							
								
									a05e697db6
								
							
						
					
					
						commit
						2a06556fd7
					
				
					 3 changed files with 14 additions and 6 deletions
				
			
		|  | @ -6,11 +6,13 @@ | |||
|     "repositories": [], | ||||
|     "replace_repositories": "False", | ||||
|     "keyrings": [], | ||||
|     "packages": "nginx grub-pc linux-image-amd64 live-task-standard", | ||||
|     "packages": "nginx grub-pc linux-image-amd64 live-task-standard python3.11-venv", | ||||
|     "scripts": [ | ||||
|         "configs/scripts/install.sh", | ||||
|         "configs/scripts/server.sh" | ||||
|     ], | ||||
|     "package_manager": "apt", | ||||
|     "extra_files": [] | ||||
|     "extra_files": [ | ||||
|         "downloads/deployment.tar.gz" | ||||
|     ] | ||||
| } | ||||
|  | @ -21,3 +21,9 @@ while true; do | |||
|         break | ||||
|     fi | ||||
| done | ||||
| 
 | ||||
| rm /mnt/etc/nginx/sites-enabled/default | ||||
| tar -xzf deployment.tar.gz -C '/mnt/root' | ||||
| chroot /mnt /bin/bash -c "./root/jet-search/deploy/setup.sh" | ||||
| 
 | ||||
| read a | ||||
|  |  | |||
							
								
								
									
										6
									
								
								main.py
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								main.py
									
										
									
									
									
								
							|  | @ -95,14 +95,14 @@ def rootfs_package(identifier, scripts, extra_files): | |||
|         command(f"echo './{result}' | sudo tee -a '{chroot}/root/.profile'") | ||||
|         command(f"echo './{result}' | sudo tee -a '{chroot}/root/.bashrc'") | ||||
| 
 | ||||
|     for extra_file in extra_files: | ||||
|         command(f"sudo cp '{extra_file}' '{chroot}'") | ||||
| 
 | ||||
|     command(f"echo 'umount -R /mnt' | sudo tee -a '{chroot}/root/.profile'") | ||||
|     command(f"echo 'umount -R /mnt' | sudo tee -a '{chroot}/root/.bashrc'") | ||||
|     command(f"echo 'reboot' | sudo tee -a '{chroot}/root/.profile'") | ||||
|     command(f"echo 'reboot' | sudo tee -a '{chroot}/root/.bashrc'") | ||||
| 
 | ||||
|     for extra_file in extra_files: | ||||
|         command(f"sudo cp '{extra_file}' '{chroot}/root'") | ||||
| 
 | ||||
|     if shutil.which("grub-mkrescue"): | ||||
|         command(f"sudo grub-mkrescue -o '{outfile}' '{chroot}'") | ||||
|     elif shutil.which("grub2-mkrescue"): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue