Skip to content

Instantly share code, notes, and snippets.

View bebehei's full-sized avatar

Benedikt Heine bebehei

View GitHub Profile
@bebehei
bebehei / part.sh
Last active January 24, 2017 11:49
LVM/LUKS partition creation
#!/bin/bash
# stop on first error
set -e
DEVICE=/dev/sdb
LUKS_DEVNAME=CRYPTsys-$(hostname)
VGROUP=VGsys-$(hostname)
LV_VOLUME_PREFIX=LV-$(hostname)-
PART_PREFIX=$(hostname)-
@bebehei
bebehei / checkserialdns.sh
Last active August 29, 2015 14:10
checkserialdns.sh check if your slave dns-servers are synchronised with your master. It users the SOA-RR and the serial-numbers to compare.
#!/usr/bin/env bash
# checkserialdns.sh: checks if your DNS master and slaves are synchronised
# Copyright (C) 2014 Benedikt Heine <bebe@bebehei.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@bebehei
bebehei / siteadd.sh
Created May 4, 2014 14:51
LNMP dedicated user per webiste
#!/bin/bash
# siteadd.sh script is used to add Unix-Accounts with surrounding setup for
# php-fpm, mysql and nginx to host a websie with a dedicated user-account
die(){
echo -e "\033[31m${@}\033[0m" >&2;
exit 1;
}