commit 59bc523e83f21c66caae63c08f60d78225cc97b9 Author: Michael Seidel Date: Sat Mar 28 18:13:57 2026 +0100 Initial backup import diff --git a/etc/fstab b/etc/fstab new file mode 100644 index 0000000..fa74272 --- /dev/null +++ b/etc/fstab @@ -0,0 +1,17 @@ +# /etc/fstab: static file system information. +# +# Use 'blkid' to print the universally unique identifier for a +# device; this may be used with UUID= as a more robust way to name devices +# that works even if disks are added and removed. See fstab(5). +# +# systemd generates mount units based on this file, see systemd.mount(5). +# Please run 'systemctl daemon-reload' after making changes here. +# +# +# / was on /dev/sda2 during installation +UUID=9c56b6fd-2a60-4480-b82f-240da2e66acc / ext4 errors=remount-ro 0 1 +# /boot/efi was on /dev/sda1 during installation +UUID=C863-7654 /boot/efi vfat umask=0077 0 1 +# swap was on /dev/sda3 during installation +UUID=da855cd2-3dc7-490d-a9c9-9c6b473b5e8b none swap sw 0 0 +/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0 diff --git a/etc/hosts b/etc/hosts new file mode 100644 index 0000000..d863b49 --- /dev/null +++ b/etc/hosts @@ -0,0 +1,7 @@ +127.0.0.1 localhost +127.0.1.1 debian + +# The following lines are desirable for IPv6 capable hosts +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters diff --git a/etc/network/interfaces b/etc/network/interfaces new file mode 100644 index 0000000..4402b80 --- /dev/null +++ b/etc/network/interfaces @@ -0,0 +1,15 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +source /etc/network/interfaces.d/* + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto ens18 +iface ens18 inet static + address 192.168.199.5 + netmask 255.255.255.0 + gateway 192.168.199.170 diff --git a/etc/nsswitch.conf b/etc/nsswitch.conf new file mode 100644 index 0000000..ed60d87 --- /dev/null +++ b/etc/nsswitch.conf @@ -0,0 +1,21 @@ +# /etc/nsswitch.conf +# +# Example configuration of GNU Name Service Switch functionality. +# If you have the `glibc-doc-reference' and `info' packages installed, try: +# `info libc "Name Service Switch"' for information about this file. + +passwd: files systemd sss winbind +group: files systemd sss winbind +shadow: files systemd sss +gshadow: files systemd + +hosts: files dns +networks: files + +protocols: db files +services: db files sss +ethers: db files +rpc: db files + +netgroup: nis sss +automount: sss diff --git a/etc/samba/smb.conf b/etc/samba/smb.conf new file mode 100644 index 0000000..6b4b62f --- /dev/null +++ b/etc/samba/smb.conf @@ -0,0 +1,55 @@ +# Global parameters +[global] + kerberos method = secrets and keytab + log file = /var/log/samba/log.%m + logging = file + map to guest = Bad User + max log size = 1000 + obey pam restrictions = No + pam password change = Yes + panic action = /usr/share/samba/panic-action %d + passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . + passwd program = /usr/bin/passwd %u + realm = FOCUS-ON-IT.DE + security = ADS + template shell = /bin/bash + unix password sync = Yes + usershare allow guests = Yes + winbind use default domain = Yes + workgroup = FOCUS-ON-IT + idmap config focus-on-it : range = 20001-999999 + idmap config focus-on-it : backend = rid + idmap config * : range = 10000-20000 + idmap config * : backend = tdb + + +[homes] + browseable = No + comment = Home Directories + create mask = 0700 + directory mask = 0700 + valid users = %S + + +[printers] + browseable = No + comment = All Printers + create mask = 0700 + path = /var/tmp + printable = Yes + + +[print$] + comment = Printer Drivers + path = /var/lib/samba/printers + + +[Nextcloud-Homes] + path = /srv/nextcloud-data/%U + read only = no + browseable = no + + create mask = 0700 + directory mask = 0700 + + valid users = %U diff --git a/etc/systemd/system/chronyd.service b/etc/systemd/system/chronyd.service new file mode 120000 index 0000000..2156f44 --- /dev/null +++ b/etc/systemd/system/chronyd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/chrony.service \ No newline at end of file diff --git a/etc/systemd/system/cloud-config.target.wants/cloud-init-hotplugd.socket b/etc/systemd/system/cloud-config.target.wants/cloud-init-hotplugd.socket new file mode 120000 index 0000000..96dc6d6 --- /dev/null +++ b/etc/systemd/system/cloud-config.target.wants/cloud-init-hotplugd.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-hotplugd.socket \ No newline at end of file diff --git a/etc/systemd/system/cloud-init.target.wants/cloud-config.service b/etc/systemd/system/cloud-init.target.wants/cloud-config.service new file mode 120000 index 0000000..ebc50f0 --- /dev/null +++ b/etc/systemd/system/cloud-init.target.wants/cloud-config.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-config.service \ No newline at end of file diff --git a/etc/systemd/system/cloud-init.target.wants/cloud-final.service b/etc/systemd/system/cloud-init.target.wants/cloud-final.service new file mode 120000 index 0000000..80fa3c8 --- /dev/null +++ b/etc/systemd/system/cloud-init.target.wants/cloud-final.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-final.service \ No newline at end of file diff --git a/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service b/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service new file mode 120000 index 0000000..dd8e9f1 --- /dev/null +++ b/etc/systemd/system/cloud-init.target.wants/cloud-init-local.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-local.service \ No newline at end of file diff --git a/etc/systemd/system/cloud-init.target.wants/cloud-init-main.service b/etc/systemd/system/cloud-init.target.wants/cloud-init-main.service new file mode 120000 index 0000000..875ff73 --- /dev/null +++ b/etc/systemd/system/cloud-init.target.wants/cloud-init-main.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-main.service \ No newline at end of file diff --git a/etc/systemd/system/cloud-init.target.wants/cloud-init-network.service b/etc/systemd/system/cloud-init.target.wants/cloud-init-network.service new file mode 120000 index 0000000..ae77734 --- /dev/null +++ b/etc/systemd/system/cloud-init.target.wants/cloud-init-network.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cloud-init-network.service \ No newline at end of file diff --git a/etc/systemd/system/dbus-org.freedesktop.timesync1.service b/etc/systemd/system/dbus-org.freedesktop.timesync1.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/etc/systemd/system/dbus-org.freedesktop.timesync1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/etc/systemd/system/default.target.wants/wtmpdb-update-boot.service b/etc/systemd/system/default.target.wants/wtmpdb-update-boot.service new file mode 120000 index 0000000..6cf726e --- /dev/null +++ b/etc/systemd/system/default.target.wants/wtmpdb-update-boot.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/wtmpdb-update-boot.service \ No newline at end of file diff --git a/etc/systemd/system/getty.target.wants/getty@tty1.service b/etc/systemd/system/getty.target.wants/getty@tty1.service new file mode 120000 index 0000000..7bfe080 --- /dev/null +++ b/etc/systemd/system/getty.target.wants/getty@tty1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/getty@.service \ No newline at end of file diff --git a/etc/systemd/system/hibernate.target.wants/grub-common.service b/etc/systemd/system/hibernate.target.wants/grub-common.service new file mode 120000 index 0000000..a655fbb --- /dev/null +++ b/etc/systemd/system/hibernate.target.wants/grub-common.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/grub-common.service \ No newline at end of file diff --git a/etc/systemd/system/hybrid-sleep.target.wants/grub-common.service b/etc/systemd/system/hybrid-sleep.target.wants/grub-common.service new file mode 120000 index 0000000..a655fbb --- /dev/null +++ b/etc/systemd/system/hybrid-sleep.target.wants/grub-common.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/grub-common.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/chrony.service b/etc/systemd/system/multi-user.target.wants/chrony.service new file mode 120000 index 0000000..2156f44 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/chrony.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/chrony.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/console-setup.service b/etc/systemd/system/multi-user.target.wants/console-setup.service new file mode 120000 index 0000000..b7959d0 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/console-setup.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/console-setup.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/cron.service b/etc/systemd/system/multi-user.target.wants/cron.service new file mode 120000 index 0000000..06cfbda --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/cron.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/cron.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service b/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service new file mode 120000 index 0000000..5be3ee0 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/e2scrub_reap.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/e2scrub_reap.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/fail2ban.service b/etc/systemd/system/multi-user.target.wants/fail2ban.service new file mode 120000 index 0000000..c1d3169 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/fail2ban.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/fail2ban.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/grub-common.service b/etc/systemd/system/multi-user.target.wants/grub-common.service new file mode 120000 index 0000000..a655fbb --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/grub-common.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/grub-common.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/networking.service b/etc/systemd/system/multi-user.target.wants/networking.service new file mode 120000 index 0000000..dbf81ff --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/networking.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/networking.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/nmbd.service b/etc/systemd/system/multi-user.target.wants/nmbd.service new file mode 120000 index 0000000..58c0d85 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/nmbd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/nmbd.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/oddjobd.service b/etc/systemd/system/multi-user.target.wants/oddjobd.service new file mode 120000 index 0000000..82f9016 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/oddjobd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/oddjobd.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/remote-fs.target b/etc/systemd/system/multi-user.target.wants/remote-fs.target new file mode 120000 index 0000000..2bc8b1c --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/remote-fs.target @@ -0,0 +1 @@ +/usr/lib/systemd/system/remote-fs.target \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/rsyslog.service b/etc/systemd/system/multi-user.target.wants/rsyslog.service new file mode 120000 index 0000000..f2d9aa9 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/rsyslog.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/rsyslog.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/samba-ad-dc.service b/etc/systemd/system/multi-user.target.wants/samba-ad-dc.service new file mode 120000 index 0000000..335955f --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/samba-ad-dc.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/samba-ad-dc.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/smbd.service b/etc/systemd/system/multi-user.target.wants/smbd.service new file mode 120000 index 0000000..5de284e --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/smbd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/smbd.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/ssh.service b/etc/systemd/system/multi-user.target.wants/ssh.service new file mode 120000 index 0000000..9535998 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/ssh.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/ssh.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/sssd.service b/etc/systemd/system/multi-user.target.wants/sssd.service new file mode 120000 index 0000000..b04dbbf --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/sssd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/unattended-upgrades.service b/etc/systemd/system/multi-user.target.wants/unattended-upgrades.service new file mode 120000 index 0000000..8c8c89b --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/unattended-upgrades.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/unattended-upgrades.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/winbind.service b/etc/systemd/system/multi-user.target.wants/winbind.service new file mode 120000 index 0000000..7d8257c --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/winbind.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/winbind.service \ No newline at end of file diff --git a/etc/systemd/system/multi-user.target.wants/zfs.target b/etc/systemd/system/multi-user.target.wants/zfs.target new file mode 120000 index 0000000..1969637 --- /dev/null +++ b/etc/systemd/system/multi-user.target.wants/zfs.target @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs.target \ No newline at end of file diff --git a/etc/systemd/system/network-online.target.wants/networking.service b/etc/systemd/system/network-online.target.wants/networking.service new file mode 120000 index 0000000..dbf81ff --- /dev/null +++ b/etc/systemd/system/network-online.target.wants/networking.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/networking.service \ No newline at end of file diff --git a/etc/systemd/system/nmb.service b/etc/systemd/system/nmb.service new file mode 120000 index 0000000..58c0d85 --- /dev/null +++ b/etc/systemd/system/nmb.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/nmbd.service \ No newline at end of file diff --git a/etc/systemd/system/samba.service b/etc/systemd/system/samba.service new file mode 120000 index 0000000..335955f --- /dev/null +++ b/etc/systemd/system/samba.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/samba-ad-dc.service \ No newline at end of file diff --git a/etc/systemd/system/smb.service b/etc/systemd/system/smb.service new file mode 120000 index 0000000..5de284e --- /dev/null +++ b/etc/systemd/system/smb.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/smbd.service \ No newline at end of file diff --git a/etc/systemd/system/ssh.service.wants/sshd-keygen.service b/etc/systemd/system/ssh.service.wants/sshd-keygen.service new file mode 120000 index 0000000..feffd4f --- /dev/null +++ b/etc/systemd/system/ssh.service.wants/sshd-keygen.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd-keygen.service \ No newline at end of file diff --git a/etc/systemd/system/ssh.socket.wants/sshd-keygen.service b/etc/systemd/system/ssh.socket.wants/sshd-keygen.service new file mode 120000 index 0000000..feffd4f --- /dev/null +++ b/etc/systemd/system/ssh.socket.wants/sshd-keygen.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd-keygen.service \ No newline at end of file diff --git a/etc/systemd/system/sshd.service b/etc/systemd/system/sshd.service new file mode 120000 index 0000000..9535998 --- /dev/null +++ b/etc/systemd/system/sshd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/ssh.service \ No newline at end of file diff --git a/etc/systemd/system/sshd.service.wants/sshd-keygen.service b/etc/systemd/system/sshd.service.wants/sshd-keygen.service new file mode 120000 index 0000000..feffd4f --- /dev/null +++ b/etc/systemd/system/sshd.service.wants/sshd-keygen.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd-keygen.service \ No newline at end of file diff --git a/etc/systemd/system/sshd@.service.wants/sshd-keygen.service b/etc/systemd/system/sshd@.service.wants/sshd-keygen.service new file mode 120000 index 0000000..feffd4f --- /dev/null +++ b/etc/systemd/system/sshd@.service.wants/sshd-keygen.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/sshd-keygen.service \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-autofs.socket b/etc/systemd/system/sssd.service.wants/sssd-autofs.socket new file mode 120000 index 0000000..be5505a --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-autofs.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-autofs.socket \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-nss.socket b/etc/systemd/system/sssd.service.wants/sssd-nss.socket new file mode 120000 index 0000000..a9b0c23 --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-nss.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-nss.socket \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-pac.socket b/etc/systemd/system/sssd.service.wants/sssd-pac.socket new file mode 120000 index 0000000..009c104 --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-pac.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-pac.socket \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-pam.socket b/etc/systemd/system/sssd.service.wants/sssd-pam.socket new file mode 120000 index 0000000..b0666d8 --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-pam.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-pam.socket \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-ssh.socket b/etc/systemd/system/sssd.service.wants/sssd-ssh.socket new file mode 120000 index 0000000..0a402c7 --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-ssh.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-ssh.socket \ No newline at end of file diff --git a/etc/systemd/system/sssd.service.wants/sssd-sudo.socket b/etc/systemd/system/sssd.service.wants/sssd-sudo.socket new file mode 120000 index 0000000..d94e621 --- /dev/null +++ b/etc/systemd/system/sssd.service.wants/sssd-sudo.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/sssd-sudo.socket \ No newline at end of file diff --git a/etc/systemd/system/suspend-then-hibernate.target.wants/grub-common.service b/etc/systemd/system/suspend-then-hibernate.target.wants/grub-common.service new file mode 120000 index 0000000..a655fbb --- /dev/null +++ b/etc/systemd/system/suspend-then-hibernate.target.wants/grub-common.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/grub-common.service \ No newline at end of file diff --git a/etc/systemd/system/suspend.target.wants/grub-common.service b/etc/systemd/system/suspend.target.wants/grub-common.service new file mode 120000 index 0000000..a655fbb --- /dev/null +++ b/etc/systemd/system/suspend.target.wants/grub-common.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/grub-common.service \ No newline at end of file diff --git a/etc/systemd/system/sysinit.target.wants/apparmor.service b/etc/systemd/system/sysinit.target.wants/apparmor.service new file mode 120000 index 0000000..f9a498e --- /dev/null +++ b/etc/systemd/system/sysinit.target.wants/apparmor.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/apparmor.service \ No newline at end of file diff --git a/etc/systemd/system/sysinit.target.wants/keyboard-setup.service b/etc/systemd/system/sysinit.target.wants/keyboard-setup.service new file mode 120000 index 0000000..312d354 --- /dev/null +++ b/etc/systemd/system/sysinit.target.wants/keyboard-setup.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/keyboard-setup.service \ No newline at end of file diff --git a/etc/systemd/system/sysinit.target.wants/systemd-pstore.service b/etc/systemd/system/sysinit.target.wants/systemd-pstore.service new file mode 120000 index 0000000..3e9b562 --- /dev/null +++ b/etc/systemd/system/sysinit.target.wants/systemd-pstore.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-pstore.service \ No newline at end of file diff --git a/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service b/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/etc/systemd/system/syslog.service b/etc/systemd/system/syslog.service new file mode 120000 index 0000000..f2d9aa9 --- /dev/null +++ b/etc/systemd/system/syslog.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/rsyslog.service \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer b/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer new file mode 120000 index 0000000..ae3ad57 --- /dev/null +++ b/etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer @@ -0,0 +1 @@ +/lib/systemd/system/apt-daily-upgrade.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/apt-daily.timer b/etc/systemd/system/timers.target.wants/apt-daily.timer new file mode 120000 index 0000000..0612ca7 --- /dev/null +++ b/etc/systemd/system/timers.target.wants/apt-daily.timer @@ -0,0 +1 @@ +/lib/systemd/system/apt-daily.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer b/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer new file mode 120000 index 0000000..12072e6 --- /dev/null +++ b/etc/systemd/system/timers.target.wants/dpkg-db-backup.timer @@ -0,0 +1 @@ +/lib/systemd/system/dpkg-db-backup.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/e2scrub_all.timer b/etc/systemd/system/timers.target.wants/e2scrub_all.timer new file mode 120000 index 0000000..30881ac --- /dev/null +++ b/etc/systemd/system/timers.target.wants/e2scrub_all.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/e2scrub_all.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/fstrim.timer b/etc/systemd/system/timers.target.wants/fstrim.timer new file mode 120000 index 0000000..2ed9fe6 --- /dev/null +++ b/etc/systemd/system/timers.target.wants/fstrim.timer @@ -0,0 +1 @@ +/lib/systemd/system/fstrim.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/logrotate.timer b/etc/systemd/system/timers.target.wants/logrotate.timer new file mode 120000 index 0000000..3bd6b36 --- /dev/null +++ b/etc/systemd/system/timers.target.wants/logrotate.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/logrotate.timer \ No newline at end of file diff --git a/etc/systemd/system/timers.target.wants/man-db.timer b/etc/systemd/system/timers.target.wants/man-db.timer new file mode 120000 index 0000000..d6b8a6e --- /dev/null +++ b/etc/systemd/system/timers.target.wants/man-db.timer @@ -0,0 +1 @@ +/usr/lib/systemd/system/man-db.timer \ No newline at end of file diff --git a/etc/systemd/system/zed.service b/etc/systemd/system/zed.service new file mode 120000 index 0000000..304d426 --- /dev/null +++ b/etc/systemd/system/zed.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-zed.service \ No newline at end of file diff --git a/etc/systemd/system/zfs-import.target.wants/zfs-import-cache.service b/etc/systemd/system/zfs-import.target.wants/zfs-import-cache.service new file mode 120000 index 0000000..4e5d50a --- /dev/null +++ b/etc/systemd/system/zfs-import.target.wants/zfs-import-cache.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-import-cache.service \ No newline at end of file diff --git a/etc/systemd/system/zfs-mount.service.wants/zfs-load-module.service b/etc/systemd/system/zfs-mount.service.wants/zfs-load-module.service new file mode 120000 index 0000000..ae92181 --- /dev/null +++ b/etc/systemd/system/zfs-mount.service.wants/zfs-load-module.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-load-module.service \ No newline at end of file diff --git a/etc/systemd/system/zfs-volumes.target.wants/zfs-volume-wait.service b/etc/systemd/system/zfs-volumes.target.wants/zfs-volume-wait.service new file mode 120000 index 0000000..2362893 --- /dev/null +++ b/etc/systemd/system/zfs-volumes.target.wants/zfs-volume-wait.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-volume-wait.service \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-import.target b/etc/systemd/system/zfs.target.wants/zfs-import.target new file mode 120000 index 0000000..849e85d --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-import.target @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-import.target \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-load-module.service b/etc/systemd/system/zfs.target.wants/zfs-load-module.service new file mode 120000 index 0000000..ae92181 --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-load-module.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-load-module.service \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-mount.service b/etc/systemd/system/zfs.target.wants/zfs-mount.service new file mode 120000 index 0000000..0d15a72 --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-mount.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-mount.service \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-share.service b/etc/systemd/system/zfs.target.wants/zfs-share.service new file mode 120000 index 0000000..a4e4b51 --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-share.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-share.service \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-volumes.target b/etc/systemd/system/zfs.target.wants/zfs-volumes.target new file mode 120000 index 0000000..d225773 --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-volumes.target @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-volumes.target \ No newline at end of file diff --git a/etc/systemd/system/zfs.target.wants/zfs-zed.service b/etc/systemd/system/zfs.target.wants/zfs-zed.service new file mode 120000 index 0000000..304d426 --- /dev/null +++ b/etc/systemd/system/zfs.target.wants/zfs-zed.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/zfs-zed.service \ No newline at end of file diff --git a/root/.ssh/config b/root/.ssh/config new file mode 100644 index 0000000..61f2c38 --- /dev/null +++ b/root/.ssh/config @@ -0,0 +1,5 @@ +Host gitea + HostName git.focus-on-it.net + User git + Port 2222 + IdentityFile /root/.ssh/id_ed25519 diff --git a/root/backup-config/backup-config.sh b/root/backup-config/backup-config.sh new file mode 100755 index 0000000..4cb4c1f --- /dev/null +++ b/root/backup-config/backup-config.sh @@ -0,0 +1,267 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +######################################## +# Einstellungen +######################################## + +SOURCE_LIST="/root/backup-config/sources.txt" +BACKUP_ROOT="/root/backup-config/backup" +LOGFILE="/var/log/backup-config.log" + +# Git +USE_GIT="yes" +GIT_BRANCH="DockerDMZ_Configfiles" + +# Verzeichnisse, die automatisch nach Config-Dateien durchsucht werden +AUTO_SCAN_DIRS=( + "/root/docker" +) + +# Dateitypen, die automatisch erkannt werden +AUTO_FILE_TYPES=( + "*.sh" + "*.yml" + "*.yaml" + "*.env" + "*.conf" + "*.cnf" + "*.ini" + "*.json" + "*.toml" + "*.service" + "Dockerfile" + "docker-compose.yml" + "compose.yml" +) + +# Pfade, die beim automatischen Scan ausgeschlossen werden +EXCLUDES=( + "*/data/pages/*" + "*/data/media/*" + "*/data/cache/*" + "*/data/tmp/*" + "*/logs/*" + "*/log/*" + "*/db/*" + "*/database/*" + "*/mysql/*" + "*/mariadb/*" + "*/postgres/*" + "*/redis/*" + "*/.git/*" +) + +######################################## +# Logging +######################################## + +log() { + printf '%s %s\n' "$(date '+%F %T')" "$1" | tee -a "$LOGFILE" +} + +######################################## +# Hilfsfunktionen +######################################## + +is_excluded() { + local path="$1" + local ex + + for ex in "${EXCLUDES[@]}"; do + if [[ "$path" == $ex ]]; then + return 0 + fi + done + + return 1 +} + +copy_path() { + local src="$1" + local rel + local dst + + if is_excluded "$src"; then + log "SKIP (exclude): $src" + return 0 + fi + + if [[ -f "$src" ]]; then + rel="${src#/}" + dst="$BACKUP_ROOT/$rel" + + mkdir -p "$(dirname "$dst")" + cp -a "$src" "$dst" + log "OK (FILE): $src -> $dst" + return 0 + fi + + if [[ -d "$src" ]]; then + rel="${src#/}" + dst="$BACKUP_ROOT/$rel" + + mkdir -p "$(dirname "$dst")" + cp -a "$src" "$dst" + log "OK (DIR): $src -> $dst" + return 0 + fi + + log "WARN: Pfad nicht gefunden: $src" + return 1 +} + +######################################## +# Automatischer Scan +######################################## + +auto_scan() { + local dir + local file + local find_expr=() + + log "INFO: Starte automatischen Scan" + + # find-Ausdruck für Dateitypen bauen + for pattern in "${AUTO_FILE_TYPES[@]}"; do + find_expr+=( -name "$pattern" -o ) + done + unset 'find_expr[${#find_expr[@]}-1]' + + for dir in "${AUTO_SCAN_DIRS[@]}"; do + if [[ ! -d "$dir" ]]; then + log "WARN: Auto-Scan-Verzeichnis fehlt: $dir" + continue + fi + + while IFS= read -r file; do + if is_excluded "$file"; then + log "SKIP (exclude): $file" + continue + fi + copy_path "$file" || true + done < <( + find "$dir" -type f \( "${find_expr[@]}" \) 2>/dev/null | sort -u + ) + done +} + +######################################## +# Git +######################################## + +git_prepare_repo() { + if [[ "$USE_GIT" != "yes" ]]; then + return 0 + fi + + if ! command -v git >/dev/null 2>&1; then + log "ERROR: Git ist nicht installiert" + return 1 + fi + + mkdir -p "$BACKUP_ROOT" + + if [[ ! -d "$BACKUP_ROOT/.git" ]]; then + log "INFO: Git-Repository wird initialisiert" + git -C "$BACKUP_ROOT" init + fi + + # Benutzerinfo prüfen + if ! git -C "$BACKUP_ROOT" config user.name >/dev/null; then + log "WARN: Git user.name ist im Repository nicht gesetzt" + fi + + if ! git -C "$BACKUP_ROOT" config user.email >/dev/null; then + log "WARN: Git user.email ist im Repository nicht gesetzt" + fi +} + +git_checkout_branch() { + local branch="$1" + + if [[ "$USE_GIT" != "yes" ]]; then + return 0 + fi + + if [[ -z "$branch" ]]; then + return 0 + fi + + if git -C "$BACKUP_ROOT" show-ref --verify --quiet "refs/heads/$branch"; then + git -C "$BACKUP_ROOT" checkout "$branch" >/dev/null 2>&1 + log "INFO: Git-Branch aktiviert: $branch" + return 0 + fi + + # Wenn noch gar kein Commit existiert, zuerst initialen Commit anlegen + if ! git -C "$BACKUP_ROOT" rev-parse --verify HEAD >/dev/null 2>&1; then + git -C "$BACKUP_ROOT" add -A + if ! git -C "$BACKUP_ROOT" diff --cached --quiet; then + git -C "$BACKUP_ROOT" commit -m "Initial backup import" + log "INFO: Initialer Commit erstellt" + fi + fi + + git -C "$BACKUP_ROOT" checkout -b "$branch" >/dev/null 2>&1 + log "INFO: Git-Branch erstellt und aktiviert: $branch" +} + +git_commit_changes() { + local changed_files + local commit_msg + + if [[ "$USE_GIT" != "yes" ]]; then + return 0 + fi + + git -C "$BACKUP_ROOT" add -A + + if git -C "$BACKUP_ROOT" diff --cached --quiet; then + log "INFO: Keine Änderungen für Git" + return 0 + fi + + changed_files="$(git -C "$BACKUP_ROOT" diff --cached --name-only | sed 's#^# - #' || true)" + + commit_msg=$( + cat <&2 + exit 1 + fi + + mkdir -p "$BACKUP_DIR" + + log "INFO: Starte Backup" + "$BACKUP_SCRIPT" + log "INFO: Backup beendet" + + cd "$BACKUP_DIR" + + if ! command -v git >/dev/null 2>&1; then + log "ERROR: Git ist nicht installiert" + exit 1 + fi + + if [[ ! -d .git ]]; then + log "INFO: Git-Repository wird initialisiert" + git init + fi + + # Branch aktivieren oder anlegen + if git show-ref --verify --quiet "refs/heads/$BRANCH"; then + git checkout "$BRANCH" >/dev/null 2>&1 + log "INFO: Git-Branch aktiviert: $BRANCH" + else + if git rev-parse --verify HEAD >/dev/null 2>&1; then + git checkout -b "$BRANCH" >/dev/null 2>&1 + else + git checkout --orphan "$BRANCH" >/dev/null 2>&1 + fi + log "INFO: Git-Branch erstellt: $BRANCH" + fi + + git add -A + + if git diff --cached --quiet; then + log "INFO: Keine neuen Dateiinhalte für Commit" + else + git commit -m "Config-Backup $(hostname) $(date '+%F %T')" + log "INFO: Commit erstellt" + fi + + if ! git remote get-url origin >/dev/null 2>&1; then + log "WARN: Kein Remote 'origin' konfiguriert, Push übersprungen" + exit 0 + fi + + # Remote-Infos aktualisieren + git fetch origin "$BRANCH" >/dev/null 2>&1 || true + + # Falls der Remote-Branch noch nicht existiert + if ! git ls-remote --exit-code --heads origin "$BRANCH" >/dev/null 2>&1; then + git push -u origin "$BRANCH" + log "INFO: Initialer Push des Branches erfolgreich" + exit 0 + fi + + # Prüfen, ob lokale Commits noch nicht gepusht wurden + AHEAD_COUNT="$(git rev-list --count "origin/$BRANCH..$BRANCH" 2>/dev/null || echo 0)" + + if [[ "$AHEAD_COUNT" -gt 0 ]]; then + git push origin "$BRANCH" + log "INFO: Push erfolgreich ($AHEAD_COUNT lokale Commits übertragen)" + else + log "INFO: Kein Push nötig, Remote ist aktuell" + fi +} + +main diff --git a/root/backup-config/sources.txt b/root/backup-config/sources.txt new file mode 100644 index 0000000..b9c2168 --- /dev/null +++ b/root/backup-config/sources.txt @@ -0,0 +1,11 @@ +#systembasis +/etc/network/interfaces +/etc/hosts +/etc/fstab +/etc/samba/smb.conf +/etc/systemd/system +/root/backup-config/backup-config.sh +/root/backup-config/run-backup-and-push.sh +/root/backup-config/sources.txt +/root/.ssh/config +/etc/nsswitch.conf