Obsoleted client_software/install.sh and user_run.sh

To make structure of client_software more clear for
following introduction of client_software.2nd
This commit is contained in:
Daniel unbrot Pätzold
2026-05-08 10:42:34 +02:00
parent 0b13f19f84
commit 1495c57a99
4 changed files with 54 additions and 97 deletions
+7 -46
View File
@@ -2,51 +2,12 @@
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Central sofwareinstallation script. Should be called from ""/sys_config/system_setup/sync_client_software.sh install"
# If P1 is given, only installs will be executed, that are containing the P1 string in their dirname
# Obsolete Script
# Will get removed completely, its only here to advise the user to update and rerun the logon_script
#
if [ "$EUID" -ne 0 ] || [ "$SUDO_USER." == "." ]; then
echo "Error: Script requires root privileges and a sudo environment."
exit 1
fi
#Check Token
if [ "${DAVTOKEN_USER}." == "." ]; then
echo "Error: Script cannot be executed standalone and needs a prereserved environement from logon-script."
echo "To get executed without password prompt, use the NOPASSWD rule in sudo. In FreeIPA you can use the sudo-option !authenticate in the sudo rule."
echo "Additionally add the sudo command to the rule: ^\/sys_config\/system_setup\/sync_client_software\.sh.*$"
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
echo "Installing additional Software."
for DIR in $(ls -d ${CLIENT_SOFTWARE_DST}/*/ | sort); # list directories in the form "/tmp/dirname/"
do
DIR=${DIR%*/} # remove the trailing "/"
if [[ "$1." != "." ]] && [[ "${DIR}" != *"$1"* ]]; then
#search for string in dir
echo "Skipping ${DIR} while not in search parameter ( $1 )."
continue
fi
if [ -f "${DIR}/install.sh" ]; then
echo "*** ==================== ***"
echo "*** Installing ${DIR##*/} ***" # print everything after the final "/"
cd ${DIR}
${DIR}/install.sh
if [ $? -ne 0 ]; then
echo "*** ==================== ***"
echo "Some Error in script, will not continue. Please check."
echo "Press any key to continue."
read -n 1 -s -r
cd ${SCRIPTPATH}
exit 1
fi
echo "*** ==================== ***"
fi
done
cd ${SCRIPTPATH}
#Last, remove unused Flatpak- Runtimes and unused Data
echo "Removing unused Flatpak- Data."
flatpak uninstall --unused -y
su -c "flatpak uninstall --delete-data -y" $SUDO_USER
echo "Sucessfully Installed Software."
echo " ==================== "
echo "Obsolete Script $0 called. Please update via git (should have been done already, check above!) and rerun the logon_script by relogon again."
echo "This Message should disappear then. Press any key to continue."
read -n 1 -s -r
exit 1