From 2e7cefc5dd06b2b295f8e670a7b15a0d1b5588a7 Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Fri, 30 Aug 2019 23:27:29 +0200 Subject: [PATCH] Update install.sh --- menu/functions/install.sh | 200 ++++---------------------------------- 1 file changed, 20 insertions(+), 180 deletions(-) diff --git a/menu/functions/install.sh b/menu/functions/install.sh index 143edb42..786e4e05 100644 --- a/menu/functions/install.sh +++ b/menu/functions/install.sh @@ -12,7 +12,6 @@ relno=$(lsb_release -sr) relno=$(printf "%.0f\n" "$relno") hostname=$(hostname -I | awk '{print $1}') - updateprime() { abc="/var/plexguide" mkdir -p ${abc} @@ -76,10 +75,8 @@ pginstall() { updateprime bash /opt/plexguide/menu/pggce/gcechecker.sh core pythonstart - core aptupdate core alias &>/dev/null & core folders - # core dependency core mergerinstall core dockerinstall core docstart @@ -106,7 +103,7 @@ pginstall() { core cleaner &>/dev/null & core serverid core prune - # customcontainers &>/dev/null & + customcontainers &>/dev/null & pgedition core mountcheck emergency @@ -136,56 +133,12 @@ aptupdate() { sed -i 's/false/true/g' /etc/default/sysstat } -# customcontainers() { - # mkdir -p /opt/mycontainers - # touch /opt/appdata/plexguide/rclone.conf - # mkdir -p /opt/communityapps/apps - # rclone --config /opt/appdata/plexguide/rclone.conf copy /opt/mycontainers/ /opt/communityapps/apps -# } - cleaner() { ansible-playbook /opt/plexguide/menu/pg.yml --tags autodelete &>/dev/null & ansible-playbook /opt/plexguide/menu/pg.yml --tags clean &>/dev/null & ansible-playbook /opt/plexguide/menu/pg.yml --tags clean-encrypt &>/dev/null & } -#- name: gather os specific variables -# include_vars: "{{ item }}" -# with_first_found: -# - "{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml" -# - "{{ ansible_distribution }}.yml" -# tags: vars -#OR -# Include OS specific tasks -#- include: CentOS.yml -# when: ansible_distribution == "CentOS" -#- include: Ubuntu.yml -# when: ansible_distribution == "Ubuntu" - -dependency() { -osname=$(lsb_release -si) - if echo $osname == "Debian" 2>&1 >> /dev/null; then -ansible-playbook /opt/pgstage/roles/dependency/debian-9.yml -elif echo $osname == "Ubuntu" 2>&1 >> /dev/null; then -ansible-playbook /opt/pgstage/roles/dependency/ubtunu-18.04-lts.yml -elif echo $osname == "Rasbian" || "Fedora" || "CentOS"; then - -tee <<-EOF -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -⛔ Argggggg ...... System Warning! -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -Supported: UBUNTU 16.xx - 18.10 ~ LTS/SERVER and Debian 9.* / 10 - -This server may not be supported due to having the incorrect OS detected! - -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -EOF - sleep 10 -fi -} - docstart() { ansible-playbook /opt/plexguide/menu/pg.yml --tags docstart } @@ -268,7 +221,7 @@ mergerinstall() { echo "ub16" >/var/plexguide/mergerfs.version wget "https://github.com/trapexit/mergerfs/releases/download/2.28.1/mergerfs_2.28.1.ubuntu-xenial_amd64.deb" - if [ "$ub18check" != "" ]; then + elif [ "$ub18check" != "" ]; then activated=true echo "ub18" >/var/plexguide/mergerfs.version wget "https://github.com/trapexit/mergerfs/releases/download/2.28.1/mergerfs_2.28.1.ubuntu-bionic_amd64.deb" @@ -298,28 +251,28 @@ mergerinstall() { apt install -y ./mergerfs*_amd64.deb rm mergerfs*_amd64.deb - tee <<-EOF + # tee <<-EOF -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -↘️ MergerFS has been updated! Requires Clone redeployment. -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +# ↘️ MergerFS has been updated! Requires Clone redeployment. +# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -INFORMATION: MergerFS was updated on your system and brings performance improvements! -Users have reported faster plex scanning and playback with the new mergerfs and pgclone configuration. +# INFORMATION: MergerFS was updated on your system and brings performance improvements! +# Users have reported faster plex scanning and playback with the new mergerfs and pgclone configuration. -ATTENTION: -You are required to re-deploy your mounts in the PG Clone menu (option 4, option A). -It is advised to check the VFS mount settings in the options menu (C,2), as options have been updated. +# ATTENTION: +# You are required to re-deploy your mounts in the PG Clone menu (option 4, option A). +# It is advised to check the VFS mount settings in the options menu (C,2), as options have been updated. -WARNING: This is not optional, you must redeploy your mounts in the PG Clone menu. -Your mounts are currently down until you re-deploy pg clone as it requires configuration updates! -This is not done for you, you must go to the PG Clone Menu (option 4) and deploy (option A). +# WARNING: This is not optional, you must redeploy your mounts in the PG Clone menu. +# Your mounts are currently down until you re-deploy pg clone as it requires configuration updates! +# This is not done for you, you must go to the PG Clone Menu (option 4) and deploy (option A). -We apologize for this one-time inconvenience. +# We apologize for this one-time inconvenience. -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -EOF - read -p 'Acknowledge Info | Press [ENTER] ' typed /var/plexguide/kcgpnv.numbers -#fi - newinstall() { rm -rf /var/plexguide/pg.exit 1>/dev/null 2>&1 file="${abc}/new.install" @@ -442,79 +350,11 @@ pgui() { pythonstart() { ansible-playbook /opt/plexguide/roles/pg.yml --tags python - - # ansible="2.8.2" - # pip="19.1.1" - - # apt-get install -y --reinstall \ - # nano \ - # git \ - # build-essential \ - # libssl-dev \ - # libffi-dev \ - # python3-dev \ - # python3-pip \ - # python-dev \ - # python-pip - # python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall pip==${pip} - # python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall setuptools - # python3 -m pip install --disable-pip-version-check --upgrade --force-reinstall \ - # pyOpenSSL \ - # requests \ - # netaddr - # python -m pip install --disable-pip-version-check --upgrade --force-reinstall pip==${pip} - # python -m pip install --disable-pip-version-check --upgrade --force-reinstall setuptools - # python -m pip install --disable-pip-version-check --upgrade --force-reinstall ansible==${1-$ansible} - - # ## Copy pip to /usr/bin - # cp /usr/local/bin/pip /usr/bin/pip - # cp /usr/local/bin/pip3 /usr/bin/pip3 - - # mkdir -p /etc/ansible/inventories/ 1>/dev/null 2>&1 - # echo "[local]" >/etc/ansible/inventories/local - # echo "127.0.0.1 ansible_connection=local" >>/etc/ansible/inventories/local - - # ### Reference: https://docs.ansible.com/ansible/2.4/intro_configuration.html - # echo "[defaults]" >/etc/ansible/ansible.cfg - # echo "deprecation_warnings=False" >>/etc/ansible/ansible.cfg - # echo "command_warnings = False" >>/etc/ansible/ansible.cfg - # echo "callback_whitelist = profile_tasks" >>/etc/ansible/ansible.cfg - # echo "inventory = /etc/ansible/inventories/local" >>/etc/ansible/ansible.cfg - - # # Variables Need to Line Up with pg.sh (start) - # touch /var/plexguide/background.1 } + ##need fixxes ! For Debian 9/10 && ubu 18.10 dockerinstall() { - # if [ "$osname" == "Debian" ]; then - # ansible-playbook /opt/plexguide/menu/pg.yml --tags dockerdeb - # else - ansible-playbook /opt/plexguide/menu/pg.yml --tags docker - # # If Docker FAILED, Emergency Install - # file="/usr/bin/docker" - # if [ ! -e "$file" ]; then - # clear - # echo "Installing Docker the Old School Way - (Please Be Patient)" - # sleep 2 - # clear - # curl -fsSL get.docker.com -o get-docker.sh - # sh get-docker.sh - # echo "" - # echo "Starting Docker (Please Be Patient)" - # sleep 2 - # systemctl start docker - # sleep 2 - # fi - - # ##### Checking Again, if fails again; warns user - # file="/usr/bin/docker" - # if [ -e "$file" ]; then - # sleep 5 - # else - # echo "INFO - FAILED: Docker Failed to Install! Exiting PGBlitz!" - # exit - # fi - # fi + ansible-playbook /opt/plexguide/menu/pg.yml --tags docker } serverid() {