Compare commits
	
		
			2 Commits
		
	
	
		
			0d06aee062
			...
			22a539fc7e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 22a539fc7e | |||
| 0ffd353874 | 
							
								
								
									
										46
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								README.md
									
									
									
									
									
								
							|  | @ -24,7 +24,7 @@ ____ | ||||||
| |     2     |**[version]**|version of Python|`3.9.5`| | |     2     |**[version]**|version of Python|`3.9.5`| | ||||||
| |     3     |**[path/to/log]**|path to log|`/dev/null`| | |     3     |**[path/to/log]**|path to log|`/dev/null`| | ||||||
| 
 | 
 | ||||||
| Example usage in terminal with make the script executable:   | ### `Example usage build-python.sh in terminal with make the script executable` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/build-python.sh | wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/build-python.sh | ||||||
|  | @ -32,7 +32,7 @@ chmod u+x ./build-python.sh | ||||||
| sudo ./build-python.sh - 3.9.5 | sudo ./build-python.sh - 3.9.5 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example usage in terminal without download:   | ### `Example usage build-python.sh in terminal without download` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| sudo su - -c "bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/build-python.sh) qn 3.9.5 install-python.log" | sudo su - -c "bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/build-python.sh) qn 3.9.5 install-python.log" | ||||||
|  | @ -57,7 +57,7 @@ ____ | ||||||
| |     2     |**[-f]**|print of the fingerprint|| | |     2     |**[-f]**|print of the fingerprint|| | ||||||
| |     2     |**[-r]**|print of the remaining days|| | |     2     |**[-r]**|print of the remaining days|| | ||||||
| 
 | 
 | ||||||
| Example usage in terminal with make the script executable:   | ### `Example usage cert-info.sh in terminal with make the script executable` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| # download | # download | ||||||
|  | @ -68,13 +68,41 @@ cert-info.sh www.hmp.today | ||||||
| cert-info.sh /etc/ssl/certs/ca-certificates.crt | cert-info.sh /etc/ssl/certs/ca-certificates.crt | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example usage in terminal without download:   | ### `Example usage cert-info.sh in terminal without download` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today | bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today | ||||||
| bash <(wget -qO- https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today | bash <(wget -qO- https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | ### `Example usage in Zabbix` | ||||||
|  | 
 | ||||||
|  | ```bash | ||||||
|  | # download | ||||||
|  | sudo wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh -O /usr/lib/zabbix/externalscripts/cert-info.sh | ||||||
|  | sudo chmod +x /usr/lib/zabbix/externalscripts/cert-info.sh | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | `Zabbix Server` - `Administration` - `Scripts` - `Create scripts` | ||||||
|  | | PARAMETER |     VALUE    | | ||||||
|  | |-----------|--------------| | ||||||
|  | |Name       |Check SSL certificate| | ||||||
|  | |Scope      |Manual host action| | ||||||
|  | |Type       |Script| | ||||||
|  | |Execute on |Zabbix server (proxy)| | ||||||
|  | |Commands   |/usr/lib/zabbix/externalscripts/cert-info.sh {$URL}| | ||||||
|  | |Description|Load certificate info from {$URL} host macro| | ||||||
|  | `Add` | ||||||
|  | 
 | ||||||
|  | `Zabbix Server` - `Configuration` - `Hosts` - `"hostname"` - `Macros` - `Add` | ||||||
|  | | PARAMETER |     VALUE    | | ||||||
|  | |-----------|--------------| | ||||||
|  | |Macro      |{$URL}| | ||||||
|  | |Value      |hostname:port| | ||||||
|  | `Update` | ||||||
|  | 
 | ||||||
|  | `Zabbix Server` - `Monitoring` - `Hosts` - `"hostname"` - `Check SSL certificate` | ||||||
|  | 
 | ||||||
| ____ | ____ | ||||||
| 
 | 
 | ||||||
| ## `sendmail`.py | ## `sendmail`.py | ||||||
|  | @ -102,7 +130,7 @@ ____ | ||||||
| |**[--file]**|mail attachment files|`None`| | |**[--file]**|mail attachment files|`None`| | ||||||
| |**[--time]**|minutes of attempts to send|3| | |**[--time]**|minutes of attempts to send|3| | ||||||
| 
 | 
 | ||||||
| Example usage in terminal with make the script executable: | ### `Example usage sendmail.py in terminal with make the script executable` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| # download | # download | ||||||
|  | @ -120,7 +148,7 @@ sendmail.py -u user@gmail.com -p password -d addr1@gmail.com,addr2@gmail.com | ||||||
| /usr/local/opt/python-3.9/bin/python3.9 /usr/local/bin/sendmail.py -u user@gmail.com -p password -d addr1@gmail.com,addr2@gmail.com --file "/path/to/file1,/path/to/file2" | /usr/local/opt/python-3.9/bin/python3.9 /usr/local/bin/sendmail.py -u user@gmail.com -p password -d addr1@gmail.com,addr2@gmail.com --file "/path/to/file1,/path/to/file2" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example usage in terminal without download:   | ### `Example usage sendmail.py in terminal without download` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| python3 <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/sendmail.py) \ | python3 <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/sendmail.py) \ | ||||||
|  | @ -132,7 +160,7 @@ python3 <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/s | ||||||
|     --file "/path/to/file1,/path/to/file2" |     --file "/path/to/file1,/path/to/file2" | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example usage in Python: | ### `Example usage sendmail.py in Python` | ||||||
| 
 | 
 | ||||||
| ```Python | ```Python | ||||||
| from sendmail import Mail | from sendmail import Mail | ||||||
|  | @ -167,7 +195,7 @@ ____ | ||||||
| |**[--force]**|"force" argument for the acme.sh|`False`| | |**[--force]**|"force" argument for the acme.sh|`False`| | ||||||
| |**[--test]**|"test" argument for the acme.sh|`False`| | |**[--test]**|"test" argument for the acme.sh|`False`| | ||||||
| 
 | 
 | ||||||
| Example usage in cron with Python: | ### `Example usage simplewc.py in cron with Python` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| # at 00:00 on Monday | # at 00:00 on Monday | ||||||
|  | @ -177,7 +205,7 @@ Example usage in cron with Python: | ||||||
| 
 | 
 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example usage in terminal with make the script executable:   | ### `Example usage simplewc.py in terminal with make the script executable` | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| chmod u+x ./simplewc.py | chmod u+x ./simplewc.py | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user