Kyiv not Kiev!!!
vitich.kiev.ua registered on Dec 15, 1999
vitich.kyiv.ua registered on Aug 24, 2023
bash
Replace author in docx files
Posted by vitich on Wednesday, 15 July 2020Install python-docx and parallel:
$ sudo apt install python-docx parallel
Save this code as /usr/local/bin/docx_author:
domain expiration check bash telegram
Posted by vitich on Friday, 17 April 2020You need your own telegram bot (@BotFather) and channel to receive messages from your bot
Place this script to your bin directory, edit bot token and chat id and add tthe script to crontab.
Add your domain list (one per line) to ~/domains.txt.
COVID-19 statistics in conky
Posted by vitich on Sunday, 5 April 2020supermicro ipmi key
Posted by vitich on Sunday, 23 February 20201) Shell:
$ echo -n '00:25:90:cd:26:da' | xxd -r -p | openssl dgst -sha1 -mac HMAC -macopt hexkey:8544E3B47ECA58F9583043F8 | awk '{print $2}' | cut -c 1-24 | fold -w4 | paste -sd'-'
857a-b7a9-4a4c-103e-3a8c-c044
Quick check ssl crt
Posted by vitich on Friday, 10 January 2020Check crt file:
$ openssl x509 -in site.crt -text -noout | grep Not
Not Before: Dec 5 11:54:00 2019 GMT
Not After : Dec 1 11:54:00 2034 GMT
Check ssl certificate online:
$ echo | openssl s_client -showcerts -servername gnu.org -connect gnu.org:443 2>/dev/null | openssl x509 -inform pem -noout -dates
notBefore=Dec 14 10:03:25 2019 GMT
notAfter=Mar 13 10:03:25 2020 GMT
Backup and restore Linux server
Posted by vitich on Thursday, 10 October 2019Migrate any mail server to hestiacp (vestacp fork)
Posted by vitich on Saturday, 31 August 2019My friend asked me to help with the migration of mail from a server running ispmanager5 lite to a server running vestacp. But this script is suitable for migration from any imap server to hestiacp panel.
I found imapsync utility and I'll use it. The email.txt file should contain a list of mailboxes and passwords, one account per line.
hcloud: command-line interface for hetzner cloud
Posted by vitich on Friday, 30 August 2019Create server:
hcloud server create --name=myserver --image=ubuntu-18.04 --type=cx31 --datacenter=hel1-dc2 --ssh-key=vitich
List our servers to get server ID:
hcloud server list
Add floating-ip
hcloud floating-ip create --type=ipv4 --home-location=hel1
List floating-ip to get floating-ip ID:
hcloud floating-ip list
Edit Java Security Exception list in Linux
Posted by vitich on Wednesday, 10 April 2019Якщо ви користуєтеся IP-KVM / iLO / IPMI то мабуть Ви стикалися з помилкою "java application blocked by security settings".
Вирішується достатньо просто:
echo "https://10.0.0.1" >> ~/.java/deployment/security/exception.sites
Якщо хочеться додати всі можливі адреси в локальній мережі, то робимо скрипт і додаємо свої мережі: