48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| 
 | |
| 
 | |
| 
 | |
| fn mycelium(){
 | |
|     let name="mycelium";
 | |
|     let url="https://github.com/threefoldtech/mycelium/releases/download/v0.6.1/mycelium-x86_64-unknown-linux-musl.tar.gz";
 | |
|     download(url,`/tmp/${name}`,5000);
 | |
|     copy_bin(`/tmp/${name}/*`);
 | |
|     delete(`/tmp/${name}`);
 | |
|     
 | |
|     let name="containerd";
 | |
| 
 | |
| }
 | |
| 
 | |
| 
 | |
| fn zinit(){
 | |
|     let name="zinit";
 | |
|     let url="https://github.com/threefoldtech/zinit/releases/download/v0.2.25/zinit-linux-x86_64";
 | |
|     download_file(url,`/tmp/${name}`,5000);
 | |
|     screen_kill("zinit");
 | |
|     copy_bin(`/tmp/${name}`);
 | |
|     delete(`/tmp/${name}`);
 | |
|     screen_new("zinit", "zinit init");
 | |
|     sleep(1);
 | |
|     let socket_path = "/tmp/zinit.sock";
 | |
| 
 | |
|     // List all services
 | |
|     print("Listing all services:");
 | |
|     let services = zinit_list(socket_path);
 | |
| 
 | |
|     if services.is_empty() {
 | |
|         print("No services found.");
 | |
|     } else {
 | |
|         // Iterate over the keys of the map
 | |
|         for name in services.keys() {
 | |
|             let state = services[name];
 | |
|             print(`${name}: ${state}`);
 | |
|         }
 | |
|     }
 | |
|     
 | |
| }
 | |
| 
 | |
| platform_check_linux_x86();
 | |
| zinit();
 | |
| // mycelium();
 | |
| 
 | |
| "done"
 |