various improvements

This commit is contained in:
julien
2025-10-03 15:14:03 +02:00
parent 8d04b2f2ed
commit b1f8257e31
5 changed files with 32 additions and 59 deletions

30
modules/config.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
echo
echo " => Configuration"
echo
if [ $profile = server ]; then
# Copy scripts
cp scripts/* /usr/local/sbin
fi
if [ $profile = desktop ]; then
# Disable all managed interfaces excerpt loopback from /etc/network/interfaces file to allow NetworkManager to manage them
sed -i '/# The primary network interface/Q' /etc/network/interfaces
# Copy user config files
if [ ! -d /etc/skel/.config ]; then
mkdir /etc/skel/.config
fi
cp -r config/. /etc/skel/.config
for f in /home/*
do
if [ ! -d $f/.config ]; then
mkdir $f/.config
fi
cp -r config/. $f/.config
chown -R ${f##*/}:${f##*/} $f/.config
done
fi

View File

@@ -1,30 +0,0 @@
#!/bin/bash
echo
echo " => Desktop"
echo
# Disable all managed interfaces excerpt loopback from /etc/network/interfaces file to allow NetworkManager to manage them
sed -i '/# The primary network interface/Q' /etc/network/interfaces
# Qt5ct and qt6ct configuration
grep -E "(export QT_QPA_PLATFORMTHEME=qt5ct)" /etc/environment > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "export QT_QPA_PLATFORMTHEME=qt5ct" >> /etc/environment
fi
# Copy user config files
if [ ! -d /etc/skel/.config ]; then
mkdir /etc/skel/.config
fi
cp -r config/. /etc/skel/.config
for f in /home/*
do
if [ ! -d $f/.config ]; then
mkdir $f/.config
fi
cp -r config/. $f/.config
chown -R ${f##*/}:${f##*/} $f/.config
done

View File

@@ -1,7 +0,0 @@
#!/bin/bash
echo
echo " => Scripts"
echo
cp scripts/* /usr/local/sbin

View File

@@ -1,19 +0,0 @@
#!/bin/bash
echo
echo " => Volumes"
echo
if [ ! -d /var/netig/srv ]; then
mkdir -p /var/netig/srv
echo
echo " => Adjust /etc/fstab accordingly !"
echo
fi
if [ ! -d /var/netig/bak ]; then
mkdir -p /var/netig/bak
echo
echo " => Adjust /etc/fstab accordingly !"
echo
fi

5
run.sh
View File

@@ -24,8 +24,7 @@ do
pkgs.sh pkgs.sh
docker.sh docker.sh
zram.sh zram.sh
scripts.sh config.sh"
volumes.sh"
break break
;; ;;
desktop) desktop)
@@ -34,7 +33,7 @@ do
firewall.sh firewall.sh
pkgs.sh pkgs.sh
zram.sh zram.sh
desktop.sh" config.sh"
break break
;; ;;
* ) * )