Skip to content

Instantly share code, notes, and snippets.

View bmatthewshea's full-sized avatar

Brady Shea bmatthewshea

View GitHub Profile
@bmatthewshea
bmatthewshea / certbot_pip_install-debian_ubuntu.md
Last active August 20, 2026 21:48
Debian/Ubuntu - CERTBOT without SNAP/SNAPD

CERTBOT - Install using Python PIP

Install Certbot using Python PIP (Package Installer for Python) - without using SNAP, APT or SYSTEMD. (Debian/Ubuntu)


This guide will help you install LetsEncrypt / Certbot using venv PIP under Debian/Ubuntu.

  • This guide has been tested up to Debian 13 / Ubuntu 24 using the newest Certbot pip release.
@bmatthewshea
bmatthewshea / omsa_install.sh
Last active April 21, 2026 14:01
OMSA Installer Script for Generation 11 Dell Server (R210 - R710) (Debian/Ubuntu)
#!/bin/bash
# Compilation script by: Brady Shea 31Mar2025
# Dell OpenManage Server Administrator (OMSA) Installer for Generation 11 Dell Servers (for Debian/Ubuntu)
# This script worked and was tested on Debian Bookworm (12.10) with Proxmox 8.3.5 running on a R710 Dell server.
#
# OMSA is needed on Generation 11 Dell Servers to adjust RAID arrays.
# OMSA can be difficult to install - especially under a Debian/Proxmox setup.
# This script should help you get it installed.
#
# OMSA Information and End-of-Life message:
@bmatthewshea
bmatthewshea / system_update.sh
Last active April 18, 2026 03:49
Ubuntu-Debian APT upgrade script
#!/bin/bash
# "system_update"
# Brady Shea
# Creation: 18SEP2020 - conversion of system_update alias to bash script
# Last update: 17APR2026 - cleaned up some of my messy bash printf strings
# update: 13DEC2024 - fixed distro string for debian, added uptime to info presented
# Original location: https://gist.github.com/bmatthewshea/6ef60db227d52f39200029312dd5446a
# Author Website: https://www.holylinux.net/
#
# Place this script in "/usr/local/sbin/system_update", or similar location under your $PATH
@bmatthewshea
bmatthewshea / myip.bash
Last active March 26, 2026 14:23
Show your default route, private IP and public IP from BASH using only fresh install/default commands. (DNSUTILS not needed.)
#!/bin/bash
# Brady Shea - APR 2024
# IP details without any extra packages installed.
# No 'dnsutils' or 'net-tools' (dig, nslookup or route) package needed for this command.
#
# Make sure these are in your path.
# They usually reside in /usr/sbin or /usr/bin if you need to set manually:
ip=$(command -v ip)
host=$(command -v host)
@bmatthewshea
bmatthewshea / 01-DOVECOT2.4_local.conf
Last active March 26, 2026 13:43
Dovecot 2.4 - Working configuration for use with PostfixAdmin and SQL Virtual Users
### /etc/dovecot/local.conf - OVERRIDES TO DEFAULTS ONLY! ###
### By: Brady Shea - 05MAR2026
### Original location: https://gist.github.com/bmatthewshea/93579a6c4af3ed3a6a4da5c3a04a48d3
# You may or may not need this:
#dovecot_config_version = 2.4.2
protocols {
lmtp = yes
imap = yes
@bmatthewshea
bmatthewshea / APT-KEY-Deprecated_Fix_Debian_Ubuntu.md
Last active March 4, 2026 18:21
Add gpg key for Debian/Ubuntu repo - New format

apt-key add (key) is deprecated

On Debian Bookworm when running apt-key add.

NOTE: RSPAMD is only used as an example. This method should work for any deprecated install instructions for apt-key.

While executing:
wget -O- https://rspamd.com/apt-stable/gpg.key | apt-key add -

The following is observed:

"Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details."

@bmatthewshea
bmatthewshea / - postfix-geoip.pl
Last active August 16, 2025 01:19
Postfix GeoIP Blocking
#!/usr/bin/perl
# Brady Shea Feb 25 2019
# starting point:
# http://web.archive.org/web/20151128083440/https://www.kutukupret.com/2011/05/29/postfix-geoip-based-rejections/
use strict;
use warnings;
use Sys::Syslog qw(:DEFAULT setlogsock);
use Geo::IP;
use Regexp::Common;
@bmatthewshea
bmatthewshea / start-ada-blocks.sh
Last active July 30, 2025 05:35
Cardano/ADA Node startup script
#!/bin/bash
## Script to start a cardano "block producing"/"pool" node
## https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/start_your_nodes.html
## Change "USER" to username needed below
# config area:
ada_bin_path=/home/USER/.local/bin
ada_config_path=/home/USER/.local/etc/cardano-node
ada_chain_path=/home/USER/cardano-blocks
ada_key_path=${ada_config_path}/keys
@bmatthewshea
bmatthewshea / geoip2lookup.bash
Last active April 14, 2025 01:46
GeoIP Lookup scripts for use with new Maxmind MMDB database files
#!/bin/bash
#
# By: Brady Shea - 10FEB2020 - Last update 04DEC2023
#
# Usage (ip4 only):
# geoip2lookup IP_ADDRESS
#
# ** Install GeoIP Tool and Updater **
#
# sudo add-apt-repository ppa:maxmind/ppa
@bmatthewshea
bmatthewshea / 99-unbound-custom.conf
Last active July 20, 2024 15:23
Unbound configuration file - Ubuntu 18.xx
## File location: /etc/unbound/unbound.conf.d/99-unbound-custom.conf (new file)
## I DO NOT USE UNBOUND.CONF - it can get overwritten.
# Logrotate needs this when using 'sharedscripts' command. You also need it to view stats afaik. Uses localhost only.
remote-control:
control-enable: yes
server:
access-control: 127.0.0.0/8 allow
access-control: 10.0.0.0/8 allow