Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-02-23 22:44:47 +0300
committerGitHub <noreply@github.com>2021-02-23 22:44:47 +0300
commit2e381bc67b1d04a34df8be5fe13740b4d05290c1 (patch)
treef8a5d8e108f1600500a983469b8d0ae54416006a /apps/whiteboard.sh
parent9c6045378e1dc27dafa6cef7eaee371913f2fbaf (diff)
introduce whiteboard app in master (#1841)
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'apps/whiteboard.sh')
-rw-r--r--apps/whiteboard.sh66
1 files changed, 66 insertions, 0 deletions
diff --git a/apps/whiteboard.sh b/apps/whiteboard.sh
new file mode 100644
index 00000000..c60fc59f
--- /dev/null
+++ b/apps/whiteboard.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# T&M Hansson IT AB © - 2021, https://www.hanssonit.se/
+# Copyright © 2021 Simon Lindner (https://github.com/szaimen)
+
+true
+SCRIPT_NAME="Whiteboard for Nextcloud"
+SCRIPT_EXPLAINER="$SCRIPT_NAME makes it possible to collaborative work on a whiteboard.
+It integrates Spacedeck whiteboard server and lets Nextcloud users create .whiteboard files which \
+can then be opened in the Files app and in Talk. Those files can be shared to other users or via \
+public links. Everyone having access with write permissions to such a file can edit it collaboratively."
+# shellcheck source=lib.sh
+source /var/scripts/fetch_lib.sh || source <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
+
+# Check for errors + debug code and abort if something isn't right
+# 1 = ON
+# 0 = OFF
+DEBUG=0
+debug_mode
+
+# Check if root
+root_check
+
+# NC 21 is required
+lowest_compatible_nc 21
+
+# Check if whiteboard is already installed
+if ! is_app_installed integration_whiteboard
+then
+ # Ask for installing
+ install_popup "$SCRIPT_NAME"
+else
+ # Ask for removal or reinstallation
+ reinstall_remove_menu "$SCRIPT_NAME"
+ # Removal
+ nextcloud_occ app:remove integration_whiteboard
+ for packet in graphicsmagick ghostscript
+ do
+ if is_this_installed "$packet"
+ then
+ apt purge "$packet" -y
+ fi
+ done
+ if is_this_installed ffmpeg && ! nextcloud_occ config:system:get enabledPreviewProviders | grep -q "Movie"
+ then
+ apt purge ffmpeg -y
+ fi
+ apt autoremove -y
+ # Show successful uninstall if applicable
+ removal_popup "$SCRIPT_NAME"
+fi
+
+# Install packages for whiteboard
+install_if_not graphicsmagick
+install_if_not ffmpeg
+install_if_not ghostscript
+
+# Install whiteboard
+install_and_enable_app integration_whiteboard
+
+if is_app_enabled integration_whiteboard
+then
+ msg_box "$SCRIPT_NAME was successfully installed!"
+else
+ msg_box "The installation wasn't successful. Please try again by running this script again!"
+fi