Moved config files to syncable folder

This commit is contained in:
Daniel Pätzold
2026-04-24 11:31:34 +02:00
parent dfbe9ec625
commit cd5bbd464b
8 changed files with 73 additions and 27 deletions
+13 -1
View File
@@ -2,7 +2,8 @@
# Replaces /etc/skel with the contents of skel.tar.zst
source $(dirname "$0")/setup_system.inc.sh
EXECDIR=$(pwd)
SRCFILE="${SYSCONFIGPATH}/system_setup/skel.tar.zst"
SRCFILE="${SYSCONFIGPATH}/config/skel.tar.zst"
SRCFILEDIST="${SYSCONFIGPATH}/config/skel.tar.zst.dist"
#Check for root
if [ "$EUID" -ne 0 ]; then
@@ -10,6 +11,16 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi
#Check for existing File - if not there, make a copy of the dist-file
if [[ ! -f "${SRCFILE}" ]]; then
echo "No SKEL file was found. Using distributed skel in ${SRCFILEDIST}"
cp "${SRCFILEDIST}" "${SRCFILE}"
if [[ $? -ne 0 ]]; then
echo "Something went wrong, please check Output"
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
fi
cd /etc
sudo rm -f -r /etc/skel
sudo tar -xf ${SRCFILE}
@@ -19,5 +30,6 @@ if [ $? -eq 0 ]; then
sudo setfacl -R -m u::rwX,g::rX,o::rX /etc/skel
else
echo "Something went wrong, please check Output"
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
cd ${EXECDIR}