Head over to https://github.com/waja/debian-update-cheatsheets/blob/buster2bullseye/buster2bullseye.sh
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 | |
SAN="${1}" | |
ACME_FILE="${2}" | |
TMP_DIR="$(mktemp -d /tmp/XXXXXXX)" | |
trap 'rm -rf -- "${TMP_DIR}"' EXIT | |
if [ ! -f "${ACME_FILE}" ] || [ -z "${ACME_FILE}" ] ; then | |
echo "error: acme file (${ACME_FILE}) missing" | |
exit |
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
# cp /usr/share/doc/quagga-core/examples/ospfd.conf.sample /etc/quagga/ospfd.conf && cp /usr/share/doc/quagga-core/examples/zebra.conf.sample /etc/quagga/zebra.conf && cp /usr/share/doc/quagga-core/examples/vtysh.conf.sample /etc/quagga/vtysh.conf | |
QUAGGA_USRGRP="frr:frr" | |
RELEASE="$(lsb_release -c -s)" | |
SERVICES=$(grep quagga /lib/systemd/system/*.service | cut -f1 -d: | uniq); | |
[ ! -f "/etc/apt/sources.list.d/${RELEASE}-backports-cyconet.list" ] && \ | |
printf "deb http://ftp.cyconet.org/debian ${RELEASE}-backports main non-free contrib\ndeb-src http://ftp.cyconet.org/debian ${RELEASE}-backports main non-free contrib\n" > /etc/apt/sources.list.d/${RELEASE}-backports-cyconet.list; \ | |
apt update && \ | |
apt-get install -t ${RELEASE}-backports -y frr; \ | |
[ -f /etc/frr/frr.conf ] && mv /etc/frr/frr.conf /etc/frr/frr.conf.orig; \ | |
for SERVICE in $SERVICES; do |
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/sh | |
host=$1; shift; | |
vmHost=$1; shift; | |
# How many Pings send to check the Default Gateway | |
PINGCOUNT="5" | |
# When should check_icmp gets faulty, see check_icmp --help | |
FAULT="5000,100%" | |
# Timeout for ping checks | |
TIMEOUT="30" |
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
object CheckCommand "check-smart" { | |
import "plugin-check-command" | |
command = [ "/usr/lib/monitoring-plugins" + "/check_smart" ] | |
arguments = { | |
"--device" = { | |
value = "$smart_device$" | |
set_if = {{ macro("$smart_device_is_glob$") == false }} | |
description = "A physical block device to be SMART monitored, eg /dev/sda. Pseudo-device /dev/bus/N is allowed." |
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
# See https://gitlab.com/richardskumat/ansible-role-client-debian-role/-/blob/master/.gitlab-ci.yml | |
image: qwe1/dind-ansible-molecule:latest | |
variables: | |
# DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
# https://gitlab.com/gitlab-org/gitlab-ce/issues/64959 | |
# 19.03 had some breaking changes compared to 18.09 | |
DOCKER_TLS_CERTDIR: "" | |
services: |
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
# tr -dc A-Za-z0-9 </dev/urandom | head -c 12 ; echo '' | |
TRAEFIK_HASH=H6UNStXJUAX5 | |
TRAEFIK_PROJECT=bitwarden | |
TRAEFIK_SERVICE_01=bitwarden |
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 | |
if [ $(ip -6 route | grep -c ^default) -eq 0 ]; then exit; fi | |
apt install socat || exit | |
cat > /etc/systemd/system/socat\@.service <<EOF | |
[Unit] | |
Description=ipv6 to ipv4 port forwarding | |
After=network.target | |
[Service] |
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 [ -f /etc/apt/apt.conf.d/00InstallRecommends ]; then | |
# remove any existing value from file | |
sed -i '/^APT::Install-Recommends/d' /etc/apt/apt.conf.d/00InstallRecommends; | |
sed -i '/^Aptitude::Recommends-Important/d' /etc/apt/apt.conf.d/00InstallRecommends; | |
# set the value | |
echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo 'Aptitude::Recommends-Important "False";' >> /etc/apt/apt.conf.d/00InstallRecommends && \ | |
echo "* Disabled automatical installation of recommended packages" | |
else | |
# set the value (and create a new file) |
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 | |
# wget https://gist.githubusercontent.com/waja/cb6c427543b9dbea4c775ccfb1f308ab/raw/fix_cert_addtrust_external_expiration_apache.sh -O /tmp/a && bash /tmp/a && apache2ctl -t && service apache2 reload | |
TMPFILE=$(mktemp) | |
trap "{ rm -rf ${TMPFILE}; }" EXIT | |
for CERT in $(grep -P "^( |\t)*SSLCertificateFile" /etc/apache2/sites-enabled/* | awk '{print $3}'); do | |
if [ \( "$(openssl x509 -in ${CERT} -issuer | head -1 | cut -d"=" -f7 | sed 's/^ *//g')" == "Sectigo RSA Domain Validation Secure Server CA" -o "$(openssl x509 -in ${CERT} -issuer | head -1 | cut -d"=" -f7 | sed 's/^ *//g')" == "COMODO RSA Domain Validation Secure Server CA" \) -a ! -L ${CERT} ]; then | |
echo "${CERT}:" | |
openssl crl2pkcs7 -nocrl -certfile ${CERT} | openssl pkcs7 -print_certs > ${TMPFILE} | |
for CA in 'COMODO RSA Certification Authority' 'USERTrust RSA Certification Authority' 'AddTrust External CA Root'; do | |
sed -i "/^subject.*${CA}/q" ${TMPFILE} |
NewerOlder