This file contains 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 | |
VERSION=24 | |
ARCH="x86_64" | |
REPO_DIR=/media/backup/repos/fedora/linux/ | |
MIRROR=( | |
"rsync://repo.atlantic.net/fedora/linux/" | |
"rsync://mirror.lstn.net/fedora-enchilada/" | |
) |
This file contains 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 | |
# | |
# /etc/kernel/postinst.d script to sign akmods kmods after kernel upgrade | |
# | |
# Author: Michael Goodwin Date: 2016-09-21 | |
# 1. Copy this script to /etc/kernel/postinst.d/ and `chmod +x` it | |
# | |
# 2. Create signing keys (store these somewhere useful and safe): | |
# $ mkdir -p /etc/pki/tls/private/mok |
This file contains 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
# Parts configured from recommmendations at: | |
# https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html and | |
# https://cipherli.st/ | |
#ssl_trusted_certificate /etc/letsencrypt/live/[ ]/chain.pem; | |
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
#ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0 | |
ssl_prefer_server_ciphers on; | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1; | |
ssl_session_cache shared:SSL:10M; |
This file contains 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
# Find listening ports of a service cgroup | |
# https://www.redpill-linpro.com/sysadvent/2016/12/22/systemd-at-3am.html | |
lsof_listen() { | |
local pids=$( ps -e -o pid,cgroup | awk '$2 ~ /'"$1"'/ { print "-p", $1 }' ) | |
sudo lsof -n -i -a -P ${pids:?ERROR: No PIDs found.} | |
} |
This file contains 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
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit name="rgba" mode="assign"> | |
<const>bgr</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit name="hinting" mode="assign"> |
This file contains 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
color_tail() { local file="$1"; shift; local awk_cmd="$(count=0; for i in "$@"; do ((count++)); printf '/%s/ {print "\\033[3%sm",$0,"\\033[39m"; next; }\n' "$i" "$count"; done; echo "{ print \$0 }")"; tail -n100 -f "$file" | eval awk \'"${awk_cmd}"\'; } |
This file contains 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
if [[ -c /dev/watchdog ]]; then if [[ -d /etc/systemd ]]; then mkdir /etc/systemd/system.conf.d &>/dev/null; else { echo "ERROR: No systemd"; exit; }; fi; echo -e "[Manager]\nRuntimeWatchdogSec=10\nShutdownWatchdogSec=3min" > /etc/systemd/system.conf.d/watchdog.conf; else { echo "No watchdog device present"; exit; }; fi && systemctl daemon-reload && systemctl daemon-reexec && systemctl show | grep Watchdog |
This file contains 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 | |
FILESET_NAME="${1:?ERROR: First argument (fileset name) not provided}" | |
AND_VERS="7.0" | |
API_VERS="24" | |
patch_list=( | |
"sigspoof-hook-${AND_VERS}" | |
"sigspoof-core" | |
"sigspoof-ui-global-${AND_VERS}" |
This file contains 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
# Because setting environment variables is HARD!! (apparently) | |
# 1. Disable gnome-keyring-ssh, or just allow ExecStartPre to do it: | |
# $ NAME="gnome-keyring-ssh.desktop"; cat "/etc/xdg/autostart/${NAME}" \ | |
# <(echo "Hidden=true") > "${HOME}/.config/autostart/${NAME}" | |
# 2. $ mkdir -p ~/.config/systemd/user | |
# 3. Place this file in ~/.config/systemd/user/ssh-auth-sock.service | |
# 4. $ systemctl --user enable --now ssh-auth-sock.service | |
# 5. Logout or reboot. | |
[Unit] |
This file contains 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 | |
LOGFILE="/var/log/freeswitch/freeswitch.log*" | |
#LOGFILE="/usr/local/freeswitch/log/freeswitch.log*" | |
USER="centos" | |
REMOTE_ADDR="${1:?ERROR: No remote address provided}" | |
UUID="${2:?ERROR: No UUID provided}" | |
get_logs() { | |
"$SUDO" find "${LOGFILE%/*}" -type f -name "${LOGFILE##*/}" ! -empty |