Skip to content

Commit

Permalink
micro kicks
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Nov 29, 2019
1 parent 6ee2efa commit 9973dd6
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 43 deletions.
3 changes: 1 addition & 2 deletions menu/alias/templates/pts
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions menu/functions/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down Expand Up @@ -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
}
####EOF###
18 changes: 0 additions & 18 deletions menu/installer/folderroleback.yml

This file was deleted.

3 changes: 2 additions & 1 deletion menu/installer/folders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 4 additions & 6 deletions menu/interface/ending.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand All @@ -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

19 changes: 15 additions & 4 deletions menu/roles/plex_autoscan/templates/config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down Expand Up @@ -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
}
}
23 changes: 18 additions & 5 deletions menu/version/choice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}'
Expand All @@ -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'

Expand Down
19 changes: 16 additions & 3 deletions menu/version/missing_pull.yml
Original file line number Diff line number Diff line change
@@ -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
################################################################################
---
Expand All @@ -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'
Expand All @@ -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

0 comments on commit 9973dd6

Please sign in to comment.