Files
fedora-OEMDRV/client_software/0110_nextcloud_talk_app/install.sh
T
Daniel Pätzold 488f04d387 Moved local dir to /opt/sys_config
Improved error logging and added function handling calls with log and return values
Improved check for matching sudo rule
2026-03-15 12:44:14 +01:00

39 lines
1.8 KiB
Bash
Executable File

#!/usr/bin/env sh
# SPDX-FileCopyrightText: Daniel Pätzold
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Sofwareinstallation script for Nextcloud Talk.
#
#Check for root
if [ "$EUID" -ne 0 ]; then
echo "Error: Script requires root. Please check if ${SCRIPTPATH}/${SCRIPTNAME} is in sudoers rules and if you are a member. And if executed via sudo."
exit 1
fi
FILENAME="Nextcloud.Talk-linux-x64.flatpak"
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
if [ ${SCRIPTPATH::2} == "//" ]; then
SCRIPTPATH=${SCRIPTPATH:1}
fi
echo "Getting new Version online and saving File to ${SCRIPTPATH}/${FILENAME}"
wget -q -P ${SCRIPTPATH} --timestamping https://github.com/nextcloud-releases/talk-desktop/releases/latest/download/${FILENAME}
# Not needed: Package has no Version, but internal Commit should be automagically detected, see "flatpak list -d"
#INSTINFO=$( /usr/bin/flatpak list --columns=app,version | grep com.nextcloud.talk )
#Hint: If this fails, try to remove and Download the File again
# Install or update Talk - always in Superuser- Mode
# As User you may install Talk in userspace (with -u), but you cannot update the runtime org.freedesktop.Platform/x86_64/XX.YY
# So it does not make any sense to install as user
/usr/bin/flatpak install -y --or-update --noninteractive --bundle ${SCRIPTPATH}/${FILENAME} && echo Done Install of ${FILENAME}
#TODO: Check if Talk is installed - if not, exit 1
exit 0
#Start App - is not working, always quits with that shell
#nohup /usr/bin/flatpak run -u --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background >/dev/null &
#/usr/bin/flatpak run -u --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk --background @@u %U @@ >/dev/null 2>&1 &