diff --git a/menu/alias/templates/pts b/menu/alias/templates/pts index 354ab80d..87c06735 100644 --- a/menu/alias/templates/pts +++ b/menu/alias/templates/pts @@ -11,8 +11,7 @@ source /opt/plexguide/menu/functions/start.sh source /opt/plexguide/menu/functions/install.sh sudocheck -folderroleback missingpull # pg deploy contains pgdeploy at end -pginstall +pginstall \ No newline at end of file diff --git a/menu/functions/install.sh b/menu/functions/install.sh index 78fe1093..6803099e 100644 --- a/menu/functions/install.sh +++ b/menu/functions/install.sh @@ -145,7 +145,7 @@ file="/opt/plexguide/menu/pg.yml" ✅ All files Valid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EOF - else ansible-playbook opt/plexguide/menu/version/missing_pull.yml; fi + else ansible-playbook /opt/plexguide/menu/version/missing_pull.yml; fi } remove(){ @@ -284,6 +284,4 @@ dockerinstall() { ansible-playbook /opt/plexguide/menu/pg.yml --tags docker } -folderroleback(){ - ansible-playbook /opt/plexguide/menu/installer/folderroleback.yml >/dev/null 2>&1 -} \ No newline at end of file +####EOF### \ No newline at end of file diff --git a/menu/installer/folderroleback.yml b/menu/installer/folderroleback.yml deleted file mode 100644 index 59dcaf9b..00000000 --- a/menu/installer/folderroleback.yml +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# Title: Folder role for update -# Author(s): MrDoobPG -# GNU: General Public License v3.0 -################################################################################ ---- -- hosts: localhost - gather_facts: false - tasks: - - name: recreate basic directions - file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000 recurse=true' - with_items: - - '/var/plexguide' - - '/var/plexguide/logs' - - '/opt/appdata/plexguide' - - '/opt/plexguide/roles/log' - ignore_errors: yes \ No newline at end of file diff --git a/menu/installer/folders.yml b/menu/installer/folders.yml index 57cf1b3e..7edae9cc 100644 --- a/menu/installer/folders.yml +++ b/menu/installer/folders.yml @@ -198,5 +198,6 @@ - '{{path.stdout}}/torrent' - '{{path.stdout}}/torrent/watch' - '{{path.stdout}}/move' - - '/opt/var' + - '/opt/plexguide/log' + - '/opt/plexguide/roles/log' ignore_errors: yes diff --git a/menu/interface/ending.sh b/menu/interface/ending.sh index 65eb0c3a..baf1e1b6 100644 --- a/menu/interface/ending.sh +++ b/menu/interface/ending.sh @@ -7,7 +7,9 @@ ################################################################################ source /opt/plexguide/menu/functions/install.sh emergency - +file="/bin/pts" +if [[ ! -f "/bin/pts" ]]; then + cp /opt/plexguide/menu/alias/templates/pts /bin && chown 1000:1000 /bin/pts && chmod 0755 /bin/pts; fi # clear echo "" @@ -34,8 +36,4 @@ cat <<"EOF" EOF -file="/bin/pts" -if [[ -f $file ]]; then - alias 1>/dev/null 2>&1 - owned 1>/dev/null 2>&1 -fi + diff --git a/menu/roles/plex_autoscan/templates/config.json.j2 b/menu/roles/plex_autoscan/templates/config.json.j2 index 37451c9d..3ba35f49 100644 --- a/menu/roles/plex_autoscan/templates/config.json.j2 +++ b/menu/roles/plex_autoscan/templates/config.json.j2 @@ -37,7 +37,7 @@ "PLEX_EMPTY_TRASH_CONTROL_FILES":[ "/mnt/unionfs/mounted.bin" ], - "PLEX_EMPTY_TRASH_MAX_FILES":50, + "PLEX_EMPTY_TRASH_MAX_FILES":100, "PLEX_EMPTY_TRASH_ZERO_DELETED":false, "PLEX_LD_LIBRARY_PATH":"/usr/lib/plexmediaserver/lib", "PLEX_LOCAL_URL": "http://localhost:32400", @@ -49,14 +49,14 @@ "PLEX_WAIT_FOR_EXTERNAL_SCANNERS":false, "RCLONE": { "BINARY": "/usr/bin/rclone", - "CONFIG": "/opt/appdata/plexguide/rclone.conf", + "CONFIG": "/home/user/.config/rclone/rclone.conf", "CRYPT_MAPPINGS": { }, "RC_CACHE_REFRESH": { "ENABLED": false, "FILE_EXISTS_TO_REMOTE_MAPPINGS": { "Media/": [ - "/mnt/unionfs/" + "/mnt/rclone/Media/" ] }, "RC_URL": "http://localhost:5572" @@ -87,7 +87,18 @@ "SERVER_PORT":3468, "SERVER_SCAN_DELAY":60, "SERVER_SCAN_FOLDER_ON_FILE_EXISTS_EXHAUSTION":true, + "SERVER_SCAN_PRIORITIES":{ + "0":[ + "/TV/" + ], + "1":[ + "/Movies/" + ], + "2":[ + "/Music/" + ] + }, "SERVER_USE_SQLITE":false, "USE_DOCKER":true, "USE_SUDO":true -} +} \ No newline at end of file diff --git a/menu/version/choice.yml b/menu/version/choice.yml index 4ce3dfbb..3f91c53e 100644 --- a/menu/version/choice.yml +++ b/menu/version/choice.yml @@ -9,14 +9,21 @@ - hosts: localhost gather_facts: false tasks: - - name: Register Project + - name: 'Register Path' shell: 'cat /var/plexguide/pg.number' register: serverid - - name: 'Setting ownership on PTS Folder' + - name: 'Check folder exist' + stat: + path: /opt/plexguide/menu/pg.yml + register: stat_result + - debug: + msg: "PTS Check for missing pull" + + - name: 'Setting preownership on PTS Folder | part 1' shell: 'chown -cR 1000:1000 /opt/plexguide 1>/dev/null 2>&1' - - name: 'Setting permissions on PTS Folder' + - name: 'Setting prepermissions on PTS Folder | part 2' shell: 'chmod -cR 775 /opt/plexguide 1>/dev/null 2>&1' - name: 'Installing Version {{serverid.stdout}}' @@ -29,12 +36,18 @@ ignore_errors: True - stat: - path: /opt/plexguide + path: /opt/plexguide/menu register: p - debug: - msg: "Path exists and PTS folder exists" + msg: "Path exists and PTS folder are pulled" when: p.stat.isdir is defined and p.stat.isdir + - name: Remove .githube folder and .git files + file: 'path={{item}} state=absent mode=0775 owner=1000 group=1000' + with_items: + - '/opt/plexguide/LICENSE' + - '/opt/plexguide/README.md' + - name: 'Setting ownership on PTS Folder' shell: 'chown -cR 1000:1000 /opt/plexguide 1>/dev/null 2>&1' diff --git a/menu/version/missing_pull.yml b/menu/version/missing_pull.yml index 2965b313..c21ea397 100644 --- a/menu/version/missing_pull.yml +++ b/menu/version/missing_pull.yml @@ -1,7 +1,8 @@ #!/bin/bash # -# Title: Missing Pull Checker -# Author(s): MrDoobPG +# Title: PTS Updater +# Author(s): Admin9705 - Deiteq +# URL: https://pgblitz.com - http://github.pgblitz.com # GNU: General Public License v3.0 ################################################################################ --- @@ -19,6 +20,12 @@ - debug: msg: "PTS Check for missing pull" + - name: 'Setting preownership on PTS Folder | part 1' + shell: 'chown -cR 1000:1000 /opt/plexguide 1>/dev/null 2>&1' + + - name: 'Setting prepermissions on PTS Folder | part 2' + shell: 'chmod -cR 775 /opt/plexguide 1>/dev/null 2>&1' + - name: 'Installing Version {{serverid.stdout}}' git: repo: 'https://github.com/PTS-Team/PTS-Team' @@ -44,6 +51,12 @@ - '/opt/plexguide/LICENSE' - '/opt/plexguide/README.md' + - name: 'Setting ownership on PTS Folder' + shell: 'chown -cR 1000:1000 /opt/plexguide 1>/dev/null 2>&1' + + - name: 'Setting permissions on PTS Folder' + shell: 'chmod -cR 775 /opt/plexguide 1>/dev/null 2>&1' + - name: 'Stops First Time Run' shell: 'touch /var/plexguide/ask.yes' - register: program + register: program \ No newline at end of file