Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
COMPOSE_VERSION=1.24.0
apt-get install docker-compose -y
#!/bin/sh
if [ $# != 1 ] ; then
echo "Usage $0 <repo>"
exit 1;
fi
REPO=$1
git clone --mirror https://github.com/adessoAnsible/$REPO.git
#!/bin/bash
KC_REALM=<insert realm name here>
KC_USERNAME=<username here>
KC_PASSWORD=<password here>
KC_CLIENT=<client name here>
KC_CLIENT_SECRET=<client secret here>
KC_SERVER=<server address and port here>
KC_CONTEXT=auth
sudo su -
apt-get update
apt-get install -y docker.io
cat << EOF > /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
service docker restart
@michaelknurr
michaelknurr / node_exporter.init.d
Last active September 20, 2018 07:44
node exporter setup
#!/bin/sh
#
# /etc/init.d/node_exporter -- startup script for node_exporter
#
# Written by Michael Knurr
#
### BEGIN INIT INFO
# Provides: Node exporter
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
@michaelknurr
michaelknurr / export-keycloak.sh
Last active August 30, 2023 08:07
Shell script for automatted keycloak backups
#!/bin/bash
# check, if another export is currently running
if [ `ps -ef|grep "keycloak.migration.action=export" |grep -v grep |wc -l` != 0 ] ; then
echo "Another export is currently running";
exit 1;
fi
# try to extract keycloak home from running keycloak instance
KEYCLOAK_HOME=$(ps -ef|grep -v grep|grep jboss.home.dir|grep keycloak|sed 's/.*\(jboss.home.dir=\)//'|awk '{print $1}')