Compare commits

..

No commits in common. "22a539fc7e8f4e552db67cea1001902353835bf4" and "0d06aee06258bb349bde0ba2205fdaf5f4ee3f20" have entirely different histories.

View File

@ -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 build-python.sh in terminal with make the script executable` Example usage 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 build-python.sh in terminal without download` Example usage 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 cert-info.sh in terminal with make the script executable` Example usage in terminal with make the script executable:
```bash ```bash
# download # download
@ -68,41 +68,13 @@ 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 cert-info.sh in terminal without download` Example usage 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
@ -130,7 +102,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 sendmail.py in terminal with make the script executable` Example usage in terminal with make the script executable:
```bash ```bash
# download # download
@ -148,7 +120,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 sendmail.py in terminal without download` Example usage 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) \
@ -160,7 +132,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 sendmail.py in Python` Example usage in Python:
```Python ```Python
from sendmail import Mail from sendmail import Mail
@ -195,7 +167,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 simplewc.py in cron with Python` Example usage in cron with Python:
```bash ```bash
# at 00:00 on Monday # at 00:00 on Monday
@ -205,7 +177,7 @@ ____
``` ```
### `Example usage simplewc.py in terminal with make the script executable` Example usage in terminal with make the script executable:
```bash ```bash
chmod u+x ./simplewc.py chmod u+x ./simplewc.py