wip-python -> removed cron for python scheduling, and added pyyaml library. #4
@@ -140,7 +140,6 @@
 | 
				
			|||||||
3. **Build and start the container**
 | 
					3. **Build and start the container**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ```bash
 | 
					    ```bash
 | 
				
			||||||
    docker compose build
 | 
					 | 
				
			||||||
    docker compose up -d
 | 
					    docker compose up -d
 | 
				
			||||||
    ```
 | 
					    ```
 | 
				
			||||||
4. **Check logs to verify updates**
 | 
					4. **Check logs to verify updates**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,7 +84,7 @@ def update_yaml_with_ips(ips):
 | 
				
			|||||||
        logging.error(f"Failed to parse YAML file {ADGUARD_YAML}")
 | 
					        logging.error(f"Failed to parse YAML file {ADGUARD_YAML}")
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    data['disallowed_clients'] = ips
 | 
					    data['dns']['disallowed_clients'] = ips
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    with TMP_YAML.open('w') as f:
 | 
					    with TMP_YAML.open('w') as f:
 | 
				
			||||||
        yaml.safe_dump(data, f)
 | 
					        yaml.safe_dump(data, f)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user