Talk: Remove old userspace and new user_run script

This commit is contained in:
Daniel Pätzold
2026-04-01 17:15:12 +02:00
parent 0e4eadbef3
commit d482c47b85
2 changed files with 49 additions and 1 deletions
@@ -1,3 +1,9 @@
#!/bin/bash
#Deinstall wrong installed userspace app
/usr/bin/flatpak list --user | grep com.nextcloud.talk
if [[ $? -eq 0 ]]; then
/usr/bin/flatpak uninstall -y --user com.nextcloud.talk
fi
# Start Nextcloud Talk in Background
/usr/bin/nohup flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background 1>/dev/null 2>&1 &
/usr/bin/nohup /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background 1>/dev/null 2>&1 &
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env sh
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Running user scripts after install (as user, not root)
# If P1 is given, only scripts will be executed, that are containing the P1 string in their dirname
#
#Check Token
if [ "${DAVTOKEN_USER}." == "." ]; then
echo "Error: Script cannot be executed standalone and needs a prereserved environement from logon-script."
echo "Press any key to continue" && read -n 1 -s -r && exit 1
fi
echo "Running user scripts in 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}/user_run.sh" ]; then
echo "*** ==================== ***"
echo "*** Running ${DIR##*/} ***" # print everything after the final "/"
cd ${DIR}
${DIR}/user_run.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
echo "Completed user scripts in software."
cd ${SCRIPTPATH}