Description of problem
Date: 2021-02-15
Keyboard model: Varmilo VA87M
Article: VA87MR
After “magic combination” keys Caps Lock and Left CTRL switched between themselves.
Continue reading
Date: 2021-02-15
Keyboard model: Varmilo VA87M
Article: VA87MR
After “magic combination” keys Caps Lock and Left CTRL switched between themselves.
Continue reading
Get labels from nodes in cluster
# Execute on manager docker node ls -q | xargs docker node inspect -f '[{{ .ID }} {{ .Description.Hostname }}]: {{ .Spec.Labels }}' # docker node ls -q | xargs docker node inspect \ -f '{{ .ID }} [{{ .Description.Hostname }}]: {{ range $k, $v := .Spec.Labels }}{{ $k }}={{ $v }} {{end}}'
Package: transmission-daemon Version: 2.94-2+deb10u1
find / -mount -type f -name settings.json -exec ls -l {} \; -rw------- 1 root root 2186 Sep 20 22:29 /root/.config/transmission-daemon/settings.json -rw-rw---- 1 debian-transmission debian-transmission 2398 Oct 30 16:37 /etc/transmission-daemon/settings.json -rw------- 1 debian-transmission debian-transmission 2226 Oct 30 16:45 /home/debian-transmission/.config/transmission-daemon/settings.json
Issue: Unable to recover files from /var/lib/letsencrypt/temp_checkpoint
# certbot 1.7.0, CentOS 7 certbot --nginx -d site.domain.com # echo Saving debug log to /var/log/letsencrypt/letsencrypt.log Unable to recover files from /var/lib/letsencrypt/temp_checkpoint Incomplete or failed recovery for /var/lib/letsencrypt/temp_checkpoint Unable to revert temporary config
I did. Solved:
yum update mv /var/lib/letsencrypt /var/lib/letsencrypt.original
sed -i 's|^Exec=.*$|Exec=bash -c "QT_SCALE_FACTOR=1.3 /opt/viber/Viber" %u|g' /usr/share/applications/viber.desktop
The value will not be random. Value will be generated from static server data, and will be in some range using python function.
For range [0..2]:
( N % 3 )
# master configuration dump salt --config-dump
uname -r Linux 2.6.32-673.26.1.lve1.4.29.el6.x86_64
auditctl -l -w /home/ -p w -k rule_home222222222222222
Asterisk put logs to /var/log/syslog
Affected OS: Ubuntu, Debian 9
# Step1: create file for rsyslog cat << EOF > /etc/rsyslog.d/10-asterisk.conf if \$programname == "asterisk" then { stop } EOF # Step2: systemctl restart rsyslog.service
Creation of file from pillar simple list with Jinja template will be create empty line, in top or bottom of file, dependence for template syntax.
You can not create file without empty lines.
#!/usr/bin/python from jinja2 import Template d = {'testlist':['item1','item2','item3']} tmpl = '''{%- for item in testlist %} {{ item }} {%- endfor %}''' t = Template(tmpl) print( t.render( d ) )
{host-id}[.dev].{dc-id}.{domain}
h01.kyiv01.domain.com h01.lon1.domain.com vs02.lon2.domain.com vs02.dev.lon1.domain.com h01.ny01.domain.com
$ VBoxManage --version WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (5.4.28-1-MANJARO) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed.
Description from vendor https://docs.saltstack.com/en/latest/topics/best_practices.html
My opinion: NEVER USE
It is not possible to see the values from this map on node or salt-master by any command, like:
pillar.get pillar.items
State will applied to the minion, even when node (or/and any parent class) has no any pillar data to this state.
Continue reading
# docker info | grep -i cgroup # kubectl get nodes kubectl get pods -n kube-system -o wide # kubectl get events --namespace=kube-system # kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml # kubeadm token create --print-join-command # kubectl get ingress -A kubectl get componentstatuses
firewall-cmd --list-all # add services firewall-cmd --add-service=zabbix-agent --permanent firewall-cmd --reload # add ports firewall-cmd --permanent --add-port=100/tcp firewall-cmd --reload
xfce4-hardware-monitor-plugin has been removed from relevant packages.
It’s so bad.
This is the best plugin for hardware monitoring! Thank you, OmegaPhil!
Will install it manually.
Vendor Git: https://git.xfce.org/archive/xfce4-hardware-monitor-plugin/
Continue reading
AMI is enabled in asterisk manager.conf
[general] enabled = yes port = 5038 bindaddr = 127.0.0.1 [admin] secret = secret --- skipped ---
, 'smpt' => [ 'SMTP.HOST' => 'ssl://smtp.gmail.com' , 'SMTP.PORT' => '465' , 'SMTP.USERNAME' => '{[email protected]}' , 'SMTP.PASSWORD' => 'PASSWORD' , 'SMTP.FROM' => '{APP_NAME}' , 'SMTP.SENDERHOST' => '{YOUR_HOST}' , 'SMTP.DEBUG' => false // as you wish ]
Monast https://github.com/dagmoller/monast.git
Debian 7
Asterisk 13.5
Tested git commits
* a02a81b 2012-06-19 | added option to set custom peer status using UserEvent [Diego Aguirre] DONT WORK - Lost connection to server each 3-4 seconds. * 777df26 2012-04-24 | changes [Diego Aguirre] WORK
Selected version bbce290 2018-01-23
Commented lines in monast.py:
server.pushTask(server.ami.command, "database show") \ .addCallbacks(onCustomPeerStatus, self._onAmiCommandFailure, errbackArgs = (servername, "Error Requesting Custom Peer Status from ASTDB"))
Now connection to asterisk not lost.
Reason on issue: too much records in database, long time of executing request ‘database show’.
$ asterisk -rx 'database deltree q-answered' 156568 database entries removed.
OS: Cloudlinux 6,7
ftp ftpserver.domain.com Connected to ftpserver.domain.com (11.22.33.44). 220----------------------------------------------- 220 This is a private system - No anonymous login Name (ftpserver.domain.com:root): ftpuser 331 User ftpuser OK. Password required Password: 230 OK. Current directory is /files Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 227 Entering Passive Mode (11.22.33.44,19,73) ftp: connect: Connection timed out
Mozilla Firefox Plugin:
https://eu.iit.com.ua/download/productfiles/[email protected]
Linux Arch package:
https://aur.archlinux.org/packages/eusw
Download:
https://iit.com.ua/download/productfiles/euswi.64.deb
debtap euswi.64.deb
$ whmapi1 listaccts api.filter.enable=1 api.filter.a.field='suspended' api.filter.a.arg0='0' api.filter.a.type=eq | grep -E 'user:| diskused:' | tr '\n' ' ' | sed 's/diskused:/\n/g' | tail -n +2 | awk 'begin {}; {sum+=$1; printf("%s %s\n",$3,$1)} END {print sum}'
Заказчик: сайт WordPress тормозит.
Сервер физический: сервер CPU 8 ядер, 16 GB RAM, Soft RAID 10
Размер дампа БД: 140 MB
Размер сайт на диске: 2.1G (c кэшем WP)
Время формирования страницы: от 15 секунд.
Continue reading
Debian 9 Stretch
Asterisk 13.14.1 from debian repo.
MariaDB 10.3.7 from MariaaDB repo.
apt install unixodbc unixodbc-dev
/etc/odbcinst.ini
[mariadb] Description=MariaDB Connector/ODBC v.2.0 Driver=/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so Setup=/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so FileUsage=1 UsageCount=2
Send script: /etc/zabbix/scripts/sendjabber.py
#!/usr/bin/env python import xmpp,sys xmpp_jid = '[email protected]' xmpp_pwd = 'password' to = sys.argv[1] msg = sys.argv[2] jid = xmpp.protocol.JID(xmpp_jid) client = xmpp.Client(jid.getDomain(),debug=[]) client.connect() client.auth(jid.getNode(),str(xmpp_pwd),resource='zabbix') client.send(xmpp.protocol.Message(to,msg)) client.disconnect()
# reset admin password: $ ejabberdctl change_password admin hostname new_password
DNS:
SRV _xmpp-client._tcp.jabber. SRV 1 1 5222 jabber.domain.com. TTL
There is site on Hosting with CageFS on CloudLinux (https://docs.cloudlinux.com/index.html?cagefs.html)
OpenCart (v.??)
Problem: don’t show images anywhere: main page, catalog (allproduct) page.
Tag src of image is empty.
No error or warning about it in php_error.log
Site place on filesystem: /home7/nickname/public_html/
Continue reading