diff -ruN smeserver-docker-0.4.old/createlinks smeserver-docker-0.4/createlinks --- smeserver-docker-0.4.old/createlinks 2022-07-12 15:58:23.395817291 +0100 +++ smeserver-docker-0.4/createlinks 2022-07-13 08:44:30.580198568 +0100 @@ -8,14 +8,30 @@ # our event specific for updating with yum without reboot $event = "smeserver-docker-update"; + #add here the path to your templates needed to expand #see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event foreach my $file (qw( /etc/systemd/system-preset/49-koozali.preset )) + +{ + templates2events($file, $event); +} + +foreach my $file (qw( + /etc/docker/daemon.json + /usr/lib/systemd/system/docker.service.d/50koozali.conf +)) { - templates2events( $file, $event ); + templates2events($file, qw( + post-upgrade + console-save + bootstrap-console-save + remoteaccess-update + smeserver-docker-update + )); } #action needed in case we have a systemd unit @@ -26,24 +42,3 @@ event_link("smeserver-docker-update", $event, "60"); - - -# Demo code below - -## ipsec-update -# -foreach (qw( - /etc/docket/daemon.json - /etc/sysconfig/docker - /etc/sysconfig/docker-storage - )) - -{ - templates2events("$_", qw( - post-upgrade - console-save - bootstrap-console-save - remoteaccess-update - )); -} - diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/10iptables smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/10iptables --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/10iptables 2022-07-12 15:58:23.393817258 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/10iptables 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -{ -$iptables = $docker{iptables} || "true"; - -# $OUT .= $iptables; - -$OUT .= "{\n"; -$OUT .= " \"iptables\": $iptables\n"; -$OUT .= "}\n"; -} - diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/10start smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/10start --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/10start 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/10start 2022-07-13 11:17:18.195078765 +0100 @@ -0,0 +1,3 @@ +{ + $OUT .= "\{\n"; +} diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/20directory smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/20directory --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/20directory 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/20directory 2022-07-13 11:18:00.010773024 +0100 @@ -0,0 +1,5 @@ +{ + my $datadir = "/home/e-smith/files/docker/data/"; + $OUT .= "\"data-root\": \"$datadir\",\n"; +} + diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/30dns smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/30dns --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/30dns 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/30dns 2022-07-13 11:19:18.699079471 +0100 @@ -0,0 +1,10 @@ +{ + my $dockerdns = $docker{'DNS'} || ${LocalIP}; + + my @dnsarray = split (",", $dockerdns); + + my $dns = join ',', map { qq/"$_"/ } @dnsarray; + + $OUT .= "\"dns\": \[$dns],\n"; +} + diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/40dockernetwork smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/40dockernetwork --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/40dockernetwork 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/40dockernetwork 2022-07-13 11:19:59.201751928 +0100 @@ -0,0 +1,6 @@ +{ + if ($dockernet = $docker{'DockerNetwork'}) { + $OUT .= " \"bip\": $dockernet,\n"; + } +} + diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/90iptables smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/90iptables --- smeserver-docker-0.4.old/root/etc/e-smith/templates/etc/docker/daemon.json/90iptables 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/etc/docker/daemon.json/90iptables 2022-07-13 11:20:25.826193969 +0100 @@ -0,0 +1,7 @@ +{ + # Last line MUST be without a comma + # So we set this to always be without a comma + $iptables = $docker{iptables} || "true"; + $OUT .= "\"iptables\": $iptables\n"; +} + diff -ruN smeserver-docker-0.4.old/root/etc/e-smith/templates/usr/lib/systemd/system/docker.service.d/50koozali.conf/40service smeserver-docker-0.4/root/etc/e-smith/templates/usr/lib/systemd/system/docker.service.d/50koozali.conf/40service --- smeserver-docker-0.4.old/root/etc/e-smith/templates/usr/lib/systemd/system/docker.service.d/50koozali.conf/40service 2022-07-12 15:58:23.394817275 +0100 +++ smeserver-docker-0.4/root/etc/e-smith/templates/usr/lib/systemd/system/docker.service.d/50koozali.conf/40service 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -[Service] -Type=notify -# the default is not to use systemd for cgroups because the delegate issues still -# exists and systemd currently does not support the cgroup feature set required -# for containers run by docker -# docker home set to /home/e-smith/files/docker -ExecStart= -ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -g /home/e-smith/files/docker/data -ExecReload=/bin/kill -s HUP $MAINPID -TimeoutSec=0 -RestartSec=2 -Restart=always -