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
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Nextcloud.Talk-linux-x64.flatpak
|
||||
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Categories=Network;InstantMessaging;Chat;VideoConference;
|
||||
Comment=Official desktop client for Nextcloud Talk
|
||||
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=electron-wrapper --file-forwarding com.nextcloud.talk @@u %U @@
|
||||
GenericName=Video and Chat Communication
|
||||
Icon=com.nextcloud.talk
|
||||
Name=Nextcloud Talk
|
||||
StartupNotify=true
|
||||
Type=Application
|
||||
X-Flatpak=com.nextcloud.talk
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#!/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 &
|
||||
Reference in New Issue
Block a user