Files
debian/modules/config.sh
2025-10-03 15:14:03 +02:00

31 lines
712 B
Bash
Executable File

#!/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