move extract to its own script (#1849)
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
Родитель
7c5d6d3796
Коммит
9c6045378e
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
|
||||
# T&M Hansson IT AB © - 2021, https://www.hanssonit.se/
|
||||
# Copyright © 2021 Simon Lindner (https://github.com/szaimen)
|
||||
|
||||
true
|
||||
SCRIPT_NAME="Extract for Nextcloud"
|
||||
SCRIPT_EXPLAINER="$SCRIPT_NAME enables archive extraction inside your Nextcloud."
|
||||
# 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
|
||||
|
||||
# Check if extract is already installed
|
||||
if ! is_app_installed extract
|
||||
then
|
||||
# Ask for installing
|
||||
install_popup "$SCRIPT_NAME"
|
||||
else
|
||||
# Ask for removal or reinstallation
|
||||
reinstall_remove_menu "$SCRIPT_NAME"
|
||||
# Removal
|
||||
nextcloud_occ app:remove extract
|
||||
for packet in unrar p7zip "p7zip-full"
|
||||
do
|
||||
if is_this_installed "$packet"
|
||||
then
|
||||
apt purge "$packet" -y
|
||||
fi
|
||||
done
|
||||
apt autoremove -y
|
||||
# Show successful uninstall if applicable
|
||||
removal_popup "$SCRIPT_NAME"
|
||||
fi
|
||||
|
||||
# Install packages for extract
|
||||
install_if_not unrar
|
||||
install_if_not p7zip
|
||||
install_if_not p7zip-full
|
||||
|
||||
# Install extract
|
||||
install_and_enable_app extract
|
||||
|
||||
# Check if it was installed
|
||||
if is_app_enabled extract
|
||||
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
|
|
@ -43,6 +43,7 @@ $CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
|
|||
"Fail2ban " "(Extra Bruteforce protection)" "$STARTUP_SWITCH" \
|
||||
"Adminer" "(PostgreSQL GUI)" OFF \
|
||||
"ClamAV" "(Antivirus for Nextcloud and files)" OFF \
|
||||
"Extract" "(Archive extraction for Nextcloud)" OFF \
|
||||
"Netdata" "(Real-time server monitoring in Web GUI)" OFF \
|
||||
"BPYTOP" "(Real-time server monitoring in CLI)" OFF \
|
||||
"Midnight Commander" "(CLI file manager)" OFF \
|
||||
|
@ -75,6 +76,10 @@ case "$choice" in
|
|||
print_text_in_color "$ICyan" "Downloading the ClamAV script..."
|
||||
run_script APP clamav
|
||||
;;&
|
||||
*"Extract"*)
|
||||
print_text_in_color "$ICyan" "Downloading the Extract script..."
|
||||
run_script APP extract
|
||||
;;&
|
||||
*"Netdata"*)
|
||||
print_text_in_color "$ICyan" "Downloading the Netdata script..."
|
||||
run_script APP netdata
|
||||
|
|
|
@ -602,7 +602,7 @@ msg_box "Restore completed!\n
|
|||
You can now simply reinstall all apps and addons that were installed on your server before!\n
|
||||
Those need to get installed (if they were installed on the old server before):
|
||||
Geoblocking, Disk Monitoring, Fail2Ban, ClamAV, SMTP Mail, DDclient, Activate TLS, OnlyOffice, Push Notifications for Nextcloud, \
|
||||
High-Performance backend for Talk, Bitwarden RS, Pi-hole, PiVPN, Plex Media Server, Remotedesktop and Midnight Commander.\n
|
||||
High-Performance backend for Nextcloud Talk, Extract for Nextcloud, Bitwarden RS, Pi-hole, PiVPN, Plex Media Server, Remotedesktop and Midnight Commander.\n
|
||||
Note:
|
||||
Bitwarden RS and Plex Media Server files were restored (if they were installed before) but the containers need to get \
|
||||
installed again to make them run with the restored files."
|
||||
|
|
Загрузка…
Ссылка в новой задаче