Skip to content

Instantly share code, notes, and snippets.

View sebastian13's full-sized avatar

Sebastian Plocek sebastian13

  • Vienna, Austria
View GitHub Profile
@sebastian13
sebastian13 / docker-compose.yml
Created March 6, 2018 15:47
docker-compose file for Wordpress + mysql database
version: '3'
services:
wordpress:
image: wordpress:php7.1-apache
container_name: example.com
restart: always
volumes:
- ./wp-content/:/var/www/html/wp-content
environment:
map $http_accept_language $lang {
default en;
~*^de de;
~*^en en;
}
server {
listen 80;
listen [::]:80;
server_name example.com;

Install Docker on Debian 9

1. Prepare Disk / Partition

# Identify the Disk
#!/bin/bash

cd /docker/zabbix
source /etc/restic/repos/example.repo
source .env

CONTAINER=zabbix_mariadb_1
#!/bin/bash
# Look for subdirectories starting with a letter
# and reset all containers
for d in [a-z]*
do
( cd "$d" && docker-compose down --remove-orphans && docker-compose up -d )
done
@sebastian13
sebastian13 / debian-install-btrbk.sh
Last active March 19, 2019 14:14
Install btrbk on Debian
#!/bin/bash
apt update
apt install make
curl https://digint.ch/download/btrbk/releases/btrbk-0.27.1.tar.xz -o /tmp/btrbk.tar.xz
tar xf /tmp/btrbk.tar.xz -C /tmp
make install -C /tmp/btrbk-0.27.1/
rm -r /tmp/btrbk*
@sebastian13
sebastian13 / zimbra-delete-all-accounts.sh
Last active August 1, 2019 13:23
Zimbra: Delete all Accounts
su zimbra
zmprov -l gaa | grep -v ^admin@.* > /tmp/all-accounts.txt
for i in `cat /tmp/all-accounts.txt`; do zmprov deleteAccount $i && echo $i $'\u2713'; done;
@sebastian13
sebastian13 / zimbra-disable-password-change.sh
Created August 2, 2019 11:02
Disable the password change option in Zimbra Webmail via the default COS. This is especially useful when using Active Directory authentication.
zmprov mc default zimbraFeatureChangePasswordEnabled FALSE
zmprov mc default zimbraPasswordLocked TRUE
zmprov mc defaultExternal zimbraFeatureChangePasswordEnabled FALSE
zmprov mc defaultExternal zimbraPasswordLocked TRUE
@sebastian13
sebastian13 / mikrotik-wifi-button.rsc
Created May 14, 2021 20:43
Script to enable & disable wifi on a Mikrotik (standalone) Access Point using the Mode Button
:log info message=("mode button was pressed");
:local i
:if ( [/int wir get 0 disabled ] = true ) do={
:foreach i in= [ /int wir find ] do={ :int wir enable $i };
} else={
:foreach i in= [ /int wir find ] do={ :int wir disable $i };
}