#!/bin/bash
# - bof - #



<<'comment'

# - Configured - #


rm -rf ~/.bashrc;
vim ~/.bashrc;

rm -rf ~/.zshrc;
vim ~/.zshrc;

ssh-keygen -R 192.168.1.1

# - On client - #
cd ~/.ssh;
ssh-keygen -t rsa;

cat ~/.ssh/id_rsa.pub;

# - On server - #
vim ~/.ssh/authorized_keys;



xdg-user-dirs-update;
sudo apt install dialog duf curl figlet git lolcat neovim pv webapp-manager -y;
sudo apt install dialog duf curl figlet git htop inxi lolcat net-tools neovim pv webapp-manager -y;

# -  - #
# - Timezone setting - #
sudo timedatectl set-timezone America/New_York;
timedatectl;



cd ~/; rm -rf ~/bEtcher.sh; vim ~/bEtcher.sh;
Copy & paste this content
chmod +x ~/bEtcher.sh; ~/./bEtcher.sh;

comment



# -  - #
# - Plex container - #
Install PlexMediaServer ProxmoxVEServer

# -  - #
# - Documentation - #
https://www.youtube.com/watch?v=Rlc70WjNypg



# :a
# -  - #
# - Download PlexServer software - #
https://github.com/tteck/Proxmox

# :a.2
# -  - #
# - ProxmoxVE Helper-Scripts - #
Click Website

# :a.2
# -  - #
Media - Photo

# :a.3
# -  - #
Plex Media Server LXC
https://tteck.github.io/Proxmox/




# -  - #
# - Start here - First step - #
# - ssh Proxmox-IS & run script - #
sshP
sudo su;

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex.sh)"

Run a manual install


# :a.4
# -  - #
# - Modify PlexServer name - #
cd /etc/pve/lxc;
vim /etc/pve/lxc/190.conf;

hostname: HPLaptop-Plex

# :a.5
# -  - #
# - Access PlexServer from website - #
10.0.0.41:32400/web





# :b
# -  - #
# - Addring Movies folder form a ZFSPool   Proxmox-IS   /OSs/Data/Plex/... - #
# - sshP2 into HPLaptopServer & configure PlexFolders - #

Stop HPLaptop-Plex

# - In terminal - #
sshP;
ssh root@192.168.1.15;

pct set 190 -mp0 /OSs/Data/Plex/Movies,mp=/Movies;
pct set 190 -mp1 /OSs/Data/Plex/xVideos,mp=/xVideos;


cd /etc/pve/lxc;
vim /etc/pve/lxc/104.conf;

#<div align='center'><a href='https%3A//Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https%3A//raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a>
#
#  # Plex LXC
#
#  <a href='https%3A//ko-fi.com/proxmoxhelperscripts'><img src='https%3A//img.shields.io/badge/&#x2615;-Buy me a coffee-blue' /></a>
#  </div>

arch: amd64
cores: 4
dev0: /dev/dri/card1,gid=44
dev1: /dev/dri/renderD128,gid=104
features: keyctl=1,nesting=1
hostname: HPLaptop-Plex
memory: 2048
mp0: /OSs/Data/Plex/Movies,mp=/Movies
mp1: /OSs/Data/Plex/xVideos,mp=/xVideos
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:4C:A8:B5,ip=dhcp,type=veth
onboot: 1
ostype: ubuntu
rootfs: OSs-Containers:190/vm-190-disk-0.raw,size=20G
swap: 512
tags: proxmox-helper-scripts
unprivileged: 1



# :c
# -  - #
# - Click HPLaptop-Plex container - #
Console

root
passwd


# -  - #
# - Create administrator user (is_derayo) - #
sudo adduser is_derayo;
sudo usermod -aG sudo is_derayo;
cat /etc/passwd;
cat /etc/group;
id is_derayo;

ip -c a;



# :d
# -  - #
# - Install software - #

ssh is_derayo@192.168.1.118;
sudo apt update && sudo apt upgrade -y sudo apt autoremove -y;
sudo apt install vim screenfetch neofetch -y;


# :e
# -  - #
# - Root password - #

sudo passwd root;

sudo vim /etc/ssh/sshd_config;

/PermitRoot
PermitRootLogin yes
PasswordAuthentication yes

:wq


sudo systemctl restart sshd;



# :f
# -  - #
# - Configure .bashrc & authorized_keys - #

cd .ssh;
vim authorized_keys;



# - eof - #