Skip to content

Instantly share code, notes, and snippets.

View maurerle's full-sized avatar

Florian Maurer maurerle

View GitHub Profile
@maurerle
maurerle / zabbix-install.sh
Created March 25, 2024 11:08
Installation script for Zabbix for Freifunk Aachen
wget https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-5+debian12_all.deb
dpkg -i zabbix-release_6.0-5+debian12_all.deb
apt update
apt install zabbix-agent2
#apt install zabbix-agent2-plugin-*
#
sed -i 's/Server=127.0.0.1$/Server=127.0.0.1,2001:470:746c:144::ffac:affe:affe,78.47.123.144,2a01:4f8:212:48:b144:ffac:affe:affe,2a01:4f8:191:13c8:b144:ffac:affe:affe/' /etc/zabbix/zabbix_agent2.conf
@maurerle
maurerle / cat_examples.md
Created March 15, 2024 15:02 — forked from masfernandez/cat_examples.md
cat file without comments

Cat files without comments! only relevant information from config files will be shown

  • PHP ini files (linnes commented with ;):
cat php.ini | egrep -v "^\s*(;|$)"
  • Apache, Nginx conf files (lines commented with #):
@maurerle
maurerle / migrate.lua
Last active March 13, 2024 12:36 — forked from DasSkelett/migrate.lua
FFULM Migration Script - rev2
#!/usr/bin/lua
-- Install at /lib/setup-mode/rc.d/S14-migrate (chmod +x)
local site = require 'gluon.site'
local uci = require('simple-uci').cursor()
local util = require 'gluon.util'
local pretty_hostname = require 'pretty_hostname'
@maurerle
maurerle / conda-install.sh
Last active March 7, 2024 09:50
Installation script for miniconda using the deb package - look at https://github.com/tartansandal/conda-bash-completion for autocompletion
#!/bin/bash
set -e
# Check for root priviliges
if [[ $EUID -ne 0 ]]; then
printf "Please run as root:\nsudo %s\n" "${0}"
exit 1
fi
# for more information look here: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html
# Install our public GPG key to trusted store
@maurerle
maurerle / make-debian-cloudinit-template.sh
Last active October 13, 2023 22:36
Script to create a cloud-init debian VM template for Proxmox from a debian cloud image
#!/bin/bash
# makes a cloud-init template vm from URL
# call like ./make-debian-template.sh 9000
# Check for root priviliges
if [[ $EUID -ne 0 ]]; then
printf "Please run as root:\nsudo %s\n" "${0}"
exit 1
fi
@maurerle
maurerle / wg-broker-server.py
Created May 9, 2023 22:40
Server for Wireguard Broker used in Freifunk Context
import glob
import os
import pwd
import re
import subprocess
import unicodedata
from flask import Flask, jsonify, request
@maurerle
maurerle / gluon-flash-fritzbox.sh
Last active July 25, 2023 10:36
Single Script to flash a fritzbox directly - superseded by https://github.com/maurerle/fritz-tools/blob/master/fritzflash.py
#!/bin/sh
# usage: skript.sh eno2 ./gluon-ffac-7520-sysupgrade.img
ip a a 192.168.178.2/24 dev $dev
set -e
image="$2"
dev="$1"
@maurerle
maurerle / make-ff-proxmox-template.sh
Last active July 25, 2023 10:08
Script to create a (Offloader) VM directly from the Freifunk Gluon x86-64 Firmware Download
#!/bin/bash
# makes a template vm from URL
# call like ./make-ff-proxmox-template.sh 9000 http://firmware-server/factory/gluon-v2022.1.2-x86-64.img.gz
ID=$1
URL=$2
FS=lvm
wget $URL -O firmware.img.gz
gzip -df firmware.img.gz
@maurerle
maurerle / docker-install.sh
Created August 31, 2022 09:30
Docker install Script
#!/bin/bash
set -e
# Check for root priviliges
if [[ $EUID -ne 0 ]]; then
printf "Please run as root:\nsudo %s\n" "${0}"
exit 1
fi
apt-get update
apt-get install ca-certificates curl gnupg lsb-release -y