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 | |
# | |
# example to run traefik in standalone mode on a | |
# linux host (or any other host supported by traefik) | |
# | |
# contribution to an article in | |
# c't magazine 19/21, Page 74 | |
# | |
# your work: | |
# - share port 80/443 by your router to this host |
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
# /etc/fstab define share | |
//192.168.178.2/scans /reshare cifs uid=reuser,gid=reuser,credentials=/root/cred | |
# /root/cred put credentials for upstream SMBv2/3 server | |
username=upuser | |
password=uppassword | |
domain=example |
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
--- | |
- name: set up docker & compose | |
hosts: docker | |
become: yes | |
tasks: | |
- name: update package index | |
apt: | |
name: "*" | |
state: latest |
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
--- | |
- name: set name, adjust /etc/hosts | |
hosts: all | |
become: yes | |
# order matters! | |
tasks: | |
- name: adjust /etc/hosts | |
replace: | |
path: /etc/hosts |
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
--- | |
- name: add ssh, deploy root key | |
hosts: all | |
become: yes | |
tasks: | |
- name: disable password authentication | |
lineinfile: | |
path: /etc/ssh/sshd_config | |
regexp: '^PasswordAuthentication' |
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 | |
# enable host for ansible | |
set -e | |
PUBKEY="" | |
id -u ansible > /dev/null 2>&1 || \ | |
adduser ansible --disabled-password \ | |
--gecos "" --quiet | |
mkdir -p /home/ansible/.ssh | |
echo "$PUBKEY" \ | |
> /home/ansible/.ssh/authorized_keys |
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 | |
# Wireguard auf Debian/Raspbian einrichten, | |
# nach c't 15/2019, S. 166 | |
# * läuft auf Raspbian oder Debian Netinst (Buster) | |
# * bitte nur auf frischen Installationen verwenden | |
# * Skript überschreibt Netzwerkkonfiguration | |
# * als pi (Raspbian) oder als root/passwortloses sudo (Debian) ausführen | |
# * schreibt Protokoll nach /var/log/wgstrap.log | |
# * zweistufiger Prozess, der einen Reboot erfordert |
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 | |
NAME=$1 | |
IP=$2 | |
[ -e /etc/wireguard/$NAME.key ] && echo "Already present" && exit | |
DNS="1.1.1.1,2606:4700:4700::1111" | |
HOST="wg.example.com:12345" | |
SRVPUB=$(cat /etc/wireguard/private.key | wg pubkey) |
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
# Turn this to yes when you have configured the options below. | |
START_DARKSTAT=yes | |
# Don't forget to read the man page. | |
# You must set this option, else darkstat may not listen to | |
# the interface you want | |
INTERFACE="-i wg0" | |
DIR="/var/lib/darkstat" |
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
./etc/apt/preferences.d/limit-unstable | |
Package: * | |
Pin: release a=unstable | |
Pin-Priority: 90 | |
./etc/apt/sources.list.d/unstable.list | |
deb http://deb.debian.org/debian/ unstable main | |
./etc/ddclient/ddclient.conf | |
protocol=dynv6 |
NewerOlder