mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
add an option to the not-supported folder (#1496)
Co-authored-by: Daniel Hansson <github@hanssonit.se>
This commit is contained in:
parent
276c2b7bc5
commit
8f5b062f27
@ -1,15 +1,14 @@
|
||||
# What is this subfolder about?
|
||||
This subdirectory of the Nextcloud VM contains scripts that are not yet ready for getting into the Release version.
|
||||
|
||||
This subdirectory of the Nextcloud VM contains scripts that probably *never* will get merged into the released version, but we keep them here so that users can test, and enjoy the befnefits of having an easy way set it up. Freedom of choice basically.
|
||||
## Can I help?
|
||||
Yes, of course! :)<br>
|
||||
Although some things in those scripts might not be 100% ready, we would love to hear your feedback regarding those.
|
||||
Feedback is especially welcome, if you would love to have some features that those scripts bring in the release version of the NcVM.<br>
|
||||
Feedback is especially welcome, if you would love to have some features that those scripts bring in the released version of the NcVM.<br>
|
||||
So please report back! 🚀
|
||||
|
||||
### How to run this inside my NcVM?
|
||||
We have prepared a Menu for you to choose from available options. You can download the Menu with the following command:<br>
|
||||
We have prepared a menu for you to choose from available options. You can download the menu with the following command:<br>
|
||||
`wget https://raw.githubusercontent.com/nextcloud/vm/master/not-supported/not-supported.sh -P /var/scripts`<br>
|
||||
After downloading the Menu, you just run it with the following command:<br>
|
||||
After downloading the menu, you just run it with the following command:<br>
|
||||
`sudo bash /var/scripts/not-supported.sh`<br>
|
||||
Running this second command will show the Menu with the latest options to choose from.
|
||||
Running this second command will show the menu with the latest options to choose from.
|
||||
|
||||
@ -26,9 +26,14 @@ So please run them on your own risk. Feedback is more than welcome, though and c
|
||||
|
||||
Choose which one you want to execute.
|
||||
$CHECKLIST_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
|
||||
"PLEX Media Server" "(Multimedia server application)" OFF \
|
||||
"SMB-server" "(Create and manage a SMB-server on OS level)" OFF 3>&1 1>&2 2>&3)
|
||||
|
||||
case "$choice" in
|
||||
*"PLEX Media Server"*)
|
||||
print_text_in_color "$ICyan" "Downloading the PLEX Media Server script..."
|
||||
run_script NOT_SUPPORTED plexmediaserver
|
||||
;;&
|
||||
*"SMB-server"*)
|
||||
print_text_in_color "$ICyan" "Downloading the SMB Server script..."
|
||||
run_script NOT_SUPPORTED smbserver
|
||||
|
||||
83
not-supported/plexmediaserver.sh
Normal file
83
not-supported/plexmediaserver.sh
Normal file
@ -0,0 +1,83 @@
|
||||
#!/bin/bash
|
||||
|
||||
# T&M Hansson IT AB © - 2020, https://www.hanssonit.se/
|
||||
# Copyright © 2020 Simon Lindner (https://github.com/szaimen)
|
||||
|
||||
# shellcheck disable=2034,2059
|
||||
true
|
||||
SCRIPT_NAME="PLEX Media Server"
|
||||
SCRIPT_EXPLAINER="PLEX Media Server is a server application that let's \
|
||||
you enjoy all your photos, music, videos, and movies in one place."
|
||||
# shellcheck source=lib.sh
|
||||
. <(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
|
||||
|
||||
# Show explainer
|
||||
explainer_popup
|
||||
|
||||
# Check if already installed
|
||||
if is_this_installed plexmediaserver
|
||||
then
|
||||
msg_box "It seems like PLEX Media Server is already installed.
|
||||
|
||||
If you want to delete PLEX Media Server and it's data to be able \
|
||||
to start from scratch, run the following two commands:
|
||||
'sudo apt purge plexmediaserver'
|
||||
'sudo deluser plex'
|
||||
|
||||
Attention! This will delete the user-data:
|
||||
'sudo rm -r /var/lib/plexmediaserver'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Show warning
|
||||
msg_box "Please note that we will add a 3rd-party repository to your server \
|
||||
to be able to install and update PLEX Media Server using the apt packet manager.
|
||||
This can set your server under risk, though!"
|
||||
if ! yesno_box_yes "Do you want to continue nonetheless?"
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install PLEX
|
||||
if curl -fsSL https://downloads.plex.tv/plex-keys/PLEXSign.key | sudo apt-key add -
|
||||
then
|
||||
echo "deb https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list
|
||||
apt update -q4 & spinner_loading
|
||||
check_command apt install plexmediaserver -y -o Dpkg::Options::="--force-confold"
|
||||
fi
|
||||
|
||||
# Put the new plex user into the www-data group
|
||||
check_command usermod --append --groups www-data plex
|
||||
|
||||
# Inform the user
|
||||
msg_box "PLEX Media Server was successfully installed.
|
||||
This script is not at the end yet so please continue."
|
||||
|
||||
# Ask if external acces shall get activated
|
||||
if yesno_box_yes "Do you want to enable access for PLEX from outside of your LAN?"
|
||||
then
|
||||
msg_box "You will have to open port 32400 TCP to make this work.
|
||||
You will have the option to automatically open this port by using UPNP in the next step."
|
||||
if yesno_box_no "Do you want to use UPNP to open port 32400 TCP?"
|
||||
then
|
||||
unset FAIL
|
||||
open_port 32400 TCP
|
||||
cleanup_open_port
|
||||
fi
|
||||
msg_box "After you hit okay, we will check if port 32400 TCP is open."
|
||||
check_open_port 32400 "$WANIP4"
|
||||
fi
|
||||
|
||||
msg_box "You should visit 'http://$ADDRESS:32400/web' to setup your PLEX Media Server next.
|
||||
Advice: All your media should be mounted in a subfolder of '/mnt' or '/media'"
|
||||
|
||||
exit
|
||||
Loading…
Reference in New Issue
Block a user