Changed how environment vars are handled
This commit is contained in:
		
							parent
							
								
									8c61f4a51c
								
							
						
					
					
						commit
						d2838646b3
					
				| @ -2,13 +2,9 @@ import requests, schedule, time, os | ||||
| from bs4 import BeautifulSoup | ||||
| from whatDomain import * | ||||
| 
 | ||||
| DEBMIRRORURL = str(os.getenv("DEBMIRRORURL", "https://www.debian.org/mirror/list")) | ||||
| DEBSECURITYURL = str(os.getenv("DEBSECURITYURL", "https://security.debian.org/debian-security/")) | ||||
| 
 | ||||
| if os.environ["DEBMIRRORURL"]: | ||||
|     DEBMIRRORURL = os.environ["DEBMIRRORURL"] | ||||
| else: | ||||
|     DEBMIRRORURL = "https://www.debian.org/mirror/list" | ||||
| 
 | ||||
| DEBSECURITYURL = ["https://security.debian.org/debian-security/"] | ||||
| EXTRASURL = ["https://download.docker.com/linux/debian/",  | ||||
|             # Double just to be sure. Even though they point to the same IP | ||||
|             "http://download.proxmox.com/debian/",  | ||||
| @ -46,7 +42,7 @@ def sanitizeURL(inpurl: str): | ||||
|     elif "http://" or "https://" not in url: | ||||
|         outurl = inpurl | ||||
|     else: | ||||
|         return -1 | ||||
|         return 1 | ||||
| 
 | ||||
|     i = 0 | ||||
|     for char in outurl: | ||||
|  | ||||
| @ -3,10 +3,10 @@ from bs4 import BeautifulSoup | ||||
| from whatDomain import ermWhatAAAATheIpFromDomainYaCrazy, ermWhatATheIpFromDomainYaCrazy | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| OPNSNSMIRRORURL = "https://opnsense.org/download/#full-mirror-listing" | ||||
| IPv4FILE = "/etc/debmirror/OPNS_MirrorListV4" | ||||
| IPv6FILE = "/etc/debmirror/OPNS_MirrorListV6" | ||||
| OPNSNSMIRRORURL = str(os.getenv("OPNSNSMIRRORURL", "https://opnsense.org/download/#full-mirror-listing")) | ||||
|   | ||||
| IPv4FILE = str(os.getenv("IPv4FILE", "/etc/debmirror/OPNS_MirrorListV4")) | ||||
| IPv6FILE = str(os.getenv("IPv6FILE", "/etc/debmirror/OPNS_MirrorListV6")) | ||||
| 
 | ||||
| 
 | ||||
| def sanitizeURL(inpurl: str): | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user