This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Program: Kill user session via loginctl <kill_session.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0.1 | |
| # | |
| # License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* | |
| sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen XX.XX.XX.XX:80; | |
| server_name YYYY.ZZ; | |
| root /var/www/NNNNNN; | |
| index index.php index.html index.htm; | |
| error_log /var/log/nginx/YYYY_error.log; | |
| access_log /var/log/nginx/YYYY_access.log main; | |
| set $fastcgipass unix:/run/php/BBBBB.sock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Program: Write SWAP to RAM <swap2ram.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0.1 | |
| # | |
| # License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [mysqld] | |
| user = mysql | |
| bind-address = 0.0.0.0 | |
| port = 3306 | |
| pid-file = /var/run/mysqld/mysqld.pid | |
| socket = /var/run/mysqld/mysqld.sock | |
| basedir = /usr | |
| datadir = /var/lib/mysql | |
| connect_timeout = 600 | |
| wait_timeout = 600 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zabbix_export: | |
| version: '5.4' | |
| date: '2021-09-19T18:59:11Z' | |
| groups: | |
| - | |
| uuid: 7df96b18c230490a9a0a9e2307226338 | |
| name: Templates | |
| templates: | |
| - | |
| uuid: ddfbae14f57f4aa09733fba5de867ce3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Bring CPUs online | |
| for CPU_DIR in /sys/devices/system/cpu/cpu[0-9]* | |
| do | |
| CPU=${CPU_DIR##*/} | |
| echo "Found cpu: '${CPU_DIR}' ..." | |
| CPU_STATE_FILE="${CPU_DIR}/online" | |
| if [ -f "${CPU_STATE_FILE}" ]; then | |
| if grep -qx 1 "${CPU_STATE_FILE}"; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Program: Check SSL certificate expires days <ssl_cert_expire.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0.2 | |
| # | |
| # License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Program: Check domain expires days <whois_domain_expire.sh> | |
| # | |
| # Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
| # | |
| # Current Version: 1.0.2 | |
| # | |
| # License: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in $(ls -1 /sys/block/ | grep -oE 'sd[a-z]|nvme.*'); do echo -n "$i: rotational: $(cat /sys/block/$i/queue/rotational) | \ | |
| scheduler: $(cat /sys/block/$i/queue/scheduler) | \ | |
| nr_requests: $(cat /sys/block/$i/queue/nr_requests) | \ | |
| rq_affinity: $(cat /sys/block/$i/queue/rq_affinity)"; [ -f "/sys/block/$i/queue/read_ahead_kb" ] && echo -n " | read_ahead_kb: $(cat /sys/block/$i/queue/read_ahead_kb)"; [ -f "/sys/block/$i/queue/iosched/writes_starved" ] && echo -n " | writes_starved: $(cat /sys/block/$i/queue/iosched/writes_starved)"; [ -f "/sys/block/$i/queue/iosched/read_expire" ] && echo -n " | read_expire: $(cat /sys/block/$i/queue/iosched/read_expire)"; echo ""; done #| awk '!(NR%2){print p "\t\t\t" $0}{p=$0}' |