Compare commits

..

2 Commits

Author SHA1 Message Date
22a539fc7e added headers 2023-08-26 11:37:39 +03:00
0ffd353874 added cert-info example usage 2023-08-26 11:28:03 +03:00

View File

@ -24,7 +24,7 @@ ____
| 2 |**[version]**|version of Python|`3.9.5`|
| 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
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
```
Example usage in terminal without download:
### `Example usage build-python.sh in terminal without download`
```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"
@ -57,7 +57,7 @@ ____
| 2 |**[-f]**|print of the fingerprint||
| 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
# download
@ -68,13 +68,41 @@ cert-info.sh www.hmp.today
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 <(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
```
### `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
@ -102,7 +130,7 @@ ____
|**[--file]**|mail attachment files|`None`|
|**[--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
# 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"
```
Example usage in terminal without download:
### `Example usage sendmail.py in terminal without download`
```bash
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"
```
Example usage in Python:
### `Example usage sendmail.py in Python`
```Python
from sendmail import Mail
@ -167,7 +195,7 @@ ____
|**[--force]**|"force" 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
# 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
chmod u+x ./simplewc.py