Skip to content

Instantly share code, notes, and snippets.

View tpokorra's full-sized avatar

Timotheus Pokorra tpokorra

View GitHub Profile
@tpokorra
tpokorra / lxc-pi
Created January 20, 2016 07:19
lxc container Raspberry Pi
#!/bin/bash
#
# lxc: linux Container library
# Authors:
# Original Debian:
# Daniel Lezcano <daniel.lezcano@free.fr>
# Changes for Raspberry Pi by:
# Oliver Heller <oliver@d24m.de>
#!/usr/bin/env python3
import os.path
import sys
from collections import deque
import urllib.request
import re
if len(sys.argv) != 2:
print("Please specify which Kolab version to run this script for. eg. 3.4, or 3.4-updates")
sys.exit(-1)
mkdir -p obs/kolab-3.4
cd obs/kolab-3.4
obsurl=http://obs.kolabsys.com/repositories/Kolab:/3.4/CentOS_7/src/
wget $obsurl -O index.html
# see http://unix.stackexchange.com/questions/181254/how-to-use-grep-and-cut-in-script-to-obtain-website-urls-from-an-html-file
for f in `cat index.html | grep rpm | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | awk -F'"' '{ print $2}'`
do
wget $obsurl/$f
done
rm index.html
using System;
using System.IO;
using System.Text;
namespace indent
{
class main
{
// Process all files in the directory passed in, recurse on any directories
// that are found, and process the files they contain.
#!/bin/bash
service cyrus-imapd start
sleep 3
toolsdir=`pwd`
while read line
do
domain=$line
kontakte=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kontakte|Contact"`
@tpokorra
tpokorra / lxc-centos
Last active January 3, 2016 16:19 — forked from hagix9/lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
@tpokorra
tpokorra / lxc-debian-wheezy
Last active October 4, 2018 19:46
lxc template for debian wheezy to install on Ubuntu precise 12.04 host
#!/bin/bash
#
# lxc: linux Container library
# Authors:
# Daniel Lezcano <daniel.lezcano@free.fr>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@tpokorra
tpokorra / upgradeLdifKolab.php
Last active December 27, 2015 10:59
upgrade ldif data from Kolab 2.3 to Kolab 3.x
<?php
# Timotheus Pokorra, for TBits.net, April 2013
#
# import ldif file that has been dumped from Kolab2
# restoring domains, domain admins, and users
require_once "/usr/share/kolab-webadmin/lib/functions.php";
function debug($msg){
if(is_writeable("/tmp/mylog.log")){
@tpokorra
tpokorra / reinstallKolabDebian.sh
Last active September 18, 2020 17:20
install kolab on Debian
service kolab-server stop
service kolab-saslauthd stop
service cyrus-imapd stop
service dirsrv stop
service wallace stop
service apache2 stop
if [ -f /usr/sbin/remove-ds-admin ]
then
sed -i "s#/usr/lib/x86_64-linux-gnu/dirsrv/perl);#/usr/lib/x86_64-linux-gnu/dirsrv/perl);\nuse lib qw(/usr/lib/dirsrv/perl);#g" /usr/sbin/remove-ds-admin
@tpokorra
tpokorra / fixannotations.sh
Created October 1, 2013 08:49
Kolab: fixes CyrusIMAP problems with 32 bit to 64 bit migration, annotations.db folder-type
# call with domain name as parameter, eg. ./fixannotations.sh mydomain.org
domain="user/*@$1"
acceptedFolderTypes=(
"event" "event.default"
"contact" "contact.default"
"note" "note.default"
"task" "task.default"
"journal" "journal.default"
"mail.outbox" "mail.sentitems" "text/plain")