Skip to content

Instantly share code, notes, and snippets.

View Docker dynamic dns on ubuntu
#!/bin/sh
#/etc/NetworkManager/dispatcher.d/02-docker-dns
case $1 in
eth0|wlan0)
case $2 in
up)
dns=$(echo $IP4_NAMESERVERS | awk -F, '{ for(i = 1; i <= NF; i++) { print "\""$i"\""; } }'|paste -d, -s)
sed -i 's/.*dns.*/ "dns": ['$dns'],/' /etc/docker/daemon.json
systemctl restart docker
@qvicksilver
qvicksilver / kickstart
Last active Nov 25, 2015
CentOS7 KickStart
View kickstart
install
text
lang en_US.UTF-8
keyboard sv-latin1
network --onboot yes --device eth0 --bootproto dhcp --noipv6
rootpw changeit
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Europe/Stockholm
@qvicksilver
qvicksilver / postinstall.jboss
Created Oct 31, 2015
EJBCA 6.3.1.1 on Wildfly 8.2.1
View postinstall.jboss
connect
/interfaces=/interface=httpspub:add(inet-address="0.0.0.0")
/interfaces=/interface=httpspriv:add(inet-address="0.0.0.0")
/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=redirect-socket, value="httpspriv")
reload
/core-service=management/security-realm=SSLRealm:add()
/core-service=management/security-realm=SSLRealm/server-identity=ssl:add(keystore-path="${jboss.server.config.dir}/keystore/keystore.jks", keystore-password="serverpwd", alias="localhost")
/core-service=management/security-realm=SSLRealm/authentication=truststore:add(keystore-path="${jboss.server.config.dir}/keystore/truststore.jks", keystore-password="changeit")
/socket-binding-group=standard-sockets/socket-binding=httpspriv:add(port="8443",interface="httpspriv")
/subsystem=undertow/server=default-server/https-listener=httpspriv:add(socket-binding=httpspriv, security-realm="SSLRealm", verify-client=REQUIRED)
@qvicksilver
qvicksilver / CentOS 6.5Kickstart
Last active Aug 29, 2015
CentOS 6.5 Kickstart
View CentOS 6.5Kickstart
install
text
lang en_US.UTF-8
keyboard sv-latin1
network --onboot yes --device eth0 --bootproto dhcp --noipv6
rootpw changeit
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Europe/Stockholm
You can’t perform that action at this time.