Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions conf/turnkey.d/confconsole-autorun
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

# copy in confconsole auto start file
mkdir -p /root/.bashrc.d/
cp /usr/share/confconsole/autostart/confconsole-auto \
/root/.bashrc.d/confconsole-auto
# should already be executable, but just in case
chmod +x /root/.bashrc.d/confconsole-auto
if [ -f /usr/share/confconsole/autostart/confconsole-auto ]; then
cp /usr/share/confconsole/autostart/confconsole-auto \
/root/.bashrc.d/confconsole-auto
# should already be executable, but just in case
chmod +x /root/.bashrc.d/confconsole-auto
else
echo "Warning: confconsole-auto file not found, skipping copy"
fi

# autostart "once"
CONF=/etc/confconsole/confconsole.conf
sed -i "s|^#autostart|autostart|g" $CONF
sed -i "s|^autostart.*|autostart once|g" $CONF
if [ -f "$CONF" ]; then
sed -i "s|^#autostart|autostart|g" $CONF
sed -i "s|^autostart.*|autostart once|g" $CONF
else
echo "Warning: $CONF not found, skipping autostart configuration"
fi
2 changes: 1 addition & 1 deletion conf/turnkey.d/dpkg-vendor
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# returns the correct string

rm -rf /etc/dpkg/origins/default
ln -s /etc/dpkg/origins/TurnKey /etc/dpkg/origins/default
ln -sf /etc/dpkg/origins/TurnKey /etc/dpkg/origins/default
1 change: 1 addition & 0 deletions conf/turnkey.d/etckeeper
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
# un-initialize etckeeper

echo "inithooks.conf" >> /etc/.gitignore
mkdir -p /etc/etckeeper/uninit.d
etckeeper uninit -f

3 changes: 2 additions & 1 deletion conf/turnkey.d/fail2ban-fixes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024305

CONF=/etc/fail2ban/fail2ban.conf
[ -f "$CONF" ] || exit 0
if ! grep -q '^allowipv6' $CONF; then
sed -i '\|^\[Definition\]|a \\nallowipv6 = auto' $CONF
fi
Expand All @@ -27,7 +28,7 @@ cat > fail2ban.patch <<EOF
cmnfailre-failed-pub-ignore =

EOF
git apply fail2ban.patch
git apply --check fail2ban.patch 2>/dev/null && git apply fail2ban.patch || echo "patch already applied, skipping"
rm fail2ban.patch

cat > /etc/cron.weekly/fail2ban <<EOF
Expand Down
2 changes: 1 addition & 1 deletion conf/turnkey.d/monit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

ln -s /etc/monit/monitrc.d/system /etc/monit/conf.d/system
ln -sf /etc/monit/monitrc.d/system /etc/monit/conf.d/system
2 changes: 1 addition & 1 deletion conf/turnkey.d/roothome
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

# harden ssh client directories
mkdir -m 0700 /etc/skel/.ssh
mkdir -p -m 0700 /etc/skel/.ssh
cp -dRn /etc/skel/.ssh /root

cp /etc/skel/.bashrc /root
Expand Down
1 change: 1 addition & 0 deletions conf/turnkey.d/webmin-conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ update_or_add no_tls1_1 1
update_or_add no_tls1_2
update_or_add extracas
update_or_add ssl_hsts 0
update_or_add ipv6 1
9 changes: 5 additions & 4 deletions conf/turnkey.d/webmin-history
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh -e

mkdir -p /etc/webmin/system-status/history
mv /etc/webmin/system-status/history /var/webmin/
ln -s /var/webmin/history /etc/webmin/system-status/history
if [ ! -L /etc/webmin/system-status/history ]; then
mkdir -p /etc/webmin/system-status/history
mv /etc/webmin/system-status/history /var/webmin/
fi
ln -sf /var/webmin/history /etc/webmin/system-status/history
12 changes: 7 additions & 5 deletions conf/turnkey.d/webmin-lets-enc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#/bin/bash -e

# Disable Webmin Let's Encrypt config - via patch

cd /usr/share/webmin/webmin
git apply /usr/local/src/webmin.patch
rm /usr/local/src/webmin.patch
if [ -f /usr/local/src/webmin.patch ]; then
cd /usr/share/webmin/webmin
git apply /usr/local/src/webmin.patch
rm /usr/local/src/webmin.patch
else
echo "webmin.patch not found, skipping (may already be applied)"
fi
12 changes: 6 additions & 6 deletions conf/turnkey.d/webmin-theme
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh -e

set ${WEBMIN_THEME:=authentic-theme}

CONF_DIR=/etc/webmin
LOGO_DIR=$CONF_DIR/$WEBMIN_THEME

echo "theme=$WEBMIN_THEME" >> $CONF_DIR/config
echo "preroot=$WEBMIN_THEME" >> $CONF_DIR/miniserv.conf

mv $LOGO_DIR/tkl-logo-white.png $LOGO_DIR/logo.png
mv $LOGO_DIR/tkl-logo-black.png $LOGO_DIR/logo_welcome.png
if [ -f $LOGO_DIR/tkl-logo-white.png ]; then
mv $LOGO_DIR/tkl-logo-white.png $LOGO_DIR/logo.png
mv $LOGO_DIR/tkl-logo-black.png $LOGO_DIR/logo_welcome.png
else
echo "TKL logos not found in overlay, skipping webmin theme logos"
fi
2 changes: 1 addition & 1 deletion mk/turnkey/apache.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMON_OVERLAYS += apache
COMMON_CONF += apache-vhost apache-headers apache-security
COMMON_CONF += apache-vhost apache-headers apache-security apache-ssl
2 changes: 2 additions & 0 deletions overlays/turnkey.d/interfaces/etc/network/interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ iface lo inet loopback

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 dhcp
hostname _UNCONFIGURED_

allow-hotplug eth1
iface eth1 inet dhcp
iface eth1 inet6 dhcp
hostname _UNCONFIGURED_
2 changes: 2 additions & 0 deletions overlays/turnkey.d/networking/etc/gai.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prefer IPv4 for external connections (v19)
precedence ::ffff:0:0/96 100
67 changes: 0 additions & 67 deletions overlays/turnkey.d/udhcpc-fix/etc/udhcpc/default.script

This file was deleted.

2 changes: 1 addition & 1 deletion plans/net
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ bind9-host # Version of 'host' bundled with BIND 9.X
netbase # Basic TCP/IP networking system
net-tools # The NET-3 networking toolkit
iproute2 # networking and traffic control tools
udhcpc # very small DHCP client
dhcpcd # Also very small DHCPv4 and DHCPv6 client
traceroute # Traces the route taken by packets over a tcp/ip network
iputils-ping # Tools to test the reachability of network hosts
8 changes: 7 additions & 1 deletion plans/turnkey/base
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dbus
/* seed entropy in early boot (especially useful when live booting). */
jitterentropy-rngd

//tklbam /* still depends on py2 for now */
tklbam

hubdns
inithooks
Expand All @@ -41,7 +41,9 @@ etckeeper
git

lsb-release
locales
localepurge
mawk
man-db
screen
dtach
Expand Down Expand Up @@ -96,3 +98,7 @@ python3-requests /* confconsole lets encrypt recommends (actually depends
//ifndef CHROOT_ONLY
acpi-support-base
//endif

/* IPv6 support for Webmin (v19) */
libsocket6-perl
libio-socket-ssl-perl
2 changes: 2 additions & 0 deletions plans/turnkey/postgresql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
postgresql
webmin-postgresql