Merge branch 'v8.5.6' into v8.5

This commit is contained in:
LooseSeal2
2019-07-13 19:44:20 -07:00
100 changed files with 7468 additions and 383 deletions

View File

@@ -1,14 +1,14 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
# Generates App List
ls -la /opt/coreapps/apps/ | sed -e 's/.yml//g' \
| awk '{print $9}' | tail -n +4 > /var/plexguide/app.list
ls -la /opt/communityapps/apps/ | sed -e 's/.yml//g' \
| awk '{print $9}' | tail -n +4 >> /var/plexguide/app.list
ls -la /opt/mycontainers/ | sed -e 's/.yml//g' \
| awk '{print $9}' | tail -n +4 >> /var/plexguide/app.list

View File

@@ -4,3 +4,4 @@ netdata
alltube
dockergc
blitzui
watchtower

View File

@@ -17,5 +17,5 @@
force: yes
owner: '1000'
group: '1000'
mode: 0755
mode: 0775
when: copycheck.stat.exists

View File

@@ -1,65 +1,65 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'airsonic'
intport: '4040'
extport: '4040'
image: 'airsonic/airsonic'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/airsonic/data'
- '/opt/appdata/{{pgrole}}/playlists:/airsonic/playlists'
- '/opt/appdata/{{pgrole}}/podcasts:/airsonic/podcasts'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
#!/bin/bash
#
# Title: PGBlitz (linuxserver/airsonic)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'airsonic'
intport: '4040'
extport: '4040'
image: 'linuxserver/airsonic'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/airsonic/data'
- '/opt/appdata/{{pgrole}}/playlists:/airsonic/playlists'
- '/opt/appdata/{{pgrole}}/podcasts:/airsonic/podcasts'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

88
apps/avidemux.yml Normal file
View File

@@ -0,0 +1,88 @@
#!/bin/bash
#
# Title: avidemux
# Author(s): timekills
# URL: https://plexguide.com - http://github.plexguide.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# CORE (MANDATORY) DO NOT CHANGE ###########################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'avidemux'
intport: '5800'
extport: '5806'
# intport2: '25565'
# extport2: '25565'
image: 'jlesage/avidemux'
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# EXTRA FUNCTIONS REQUIRED BY THE ROLE #####################################
- name: 'Create scripts directory for {{pgrole}}'
file:
path: /opt/appdata/{{pgrole}}/scripts
state: directory
owner: 1000
group: 1000
mode: 0755
- name: 'Create plugins directory for {{pgrole}}'
file:
path: /opt/appdata/{{pgrole}}/plugins
state: directory
owner: 1000
group: 1000
mode: 0755
# LABELS #### KEEPS BOTTOM CLEAN ###########################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config:rw'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: 1000
PGID: 1000
# Default width is 1280 If you comment out the next line it will use 1280.
DISPLAY_WIDTH: 1600
# Default height is 768. If you comment out the next line it will use 768.
DISPLAY_HEIGHT: 960
# MAIN SCRIPT ##############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -28,7 +28,6 @@
traefik.enable: 'true'
traefik.backend: "{{pgrole}}"
traefik.port: '80'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:bit.{{domain.stdout}},{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

66
apps/calibre-web.yml Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/bash
#
# Title: PGBlitz (calibre-web)
# Author(s): Sejrup
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'calibre-web'
intport: '8083'
extport: '8083'
image: 'technosoft2000/calibre-web'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/coreapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/books'
- '/opt/appdata/{{pgrole}}/config:/calibre-web/config'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
USE_CONFIG_DIR: 'true'
SET_CONTAINER_TIMEZONE: 'true'
CONTAINER_TIMEZONE: 'Europe/Copenhagen'
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: always
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -141,14 +141,14 @@
lineinfile:
path: '/opt/appdata/{{pgrole}}/core.conf'
regexp: '"move_completed".*'
line: '"move_completed": true,'
line: '"move_completed": True,'
state: present
- name: Setting extractor folder
lineinfile:
path: '/opt/appdata/{{pgrole}}/plugins/extractor.conf'
regexp: '"use_name_folder".*'
line: '"use_name_folder": true,'
line: '"use_name_folder": True,'
state: present
- name: Setting extractor
@@ -172,7 +172,7 @@
lineinfile:
path: '/opt/appdata/{{pgrole}}/core.conf'
regexp: '"compact_allocation".*'
line: '"compact_allocation": true,'
line: '"compact_allocation": True,'
state: present
- name: set stop_seed_ratio
@@ -193,14 +193,14 @@
lineinfile:
path: '/opt/appdata/{{pgrole}}/core.conf'
regexp: '"remove_seed_at_ratio".*'
line: '"remove_seed_at_ratio": true,'
line: '"remove_seed_at_ratio": True,'
state: present
- name: set enc_prefer_rc4
lineinfile:
path: '/opt/appdata/{{pgrole}}/core.conf'
regexp: '"enc_prefer_rc4".*'
line: '"enc_prefer_rc4": true,'
line: '"enc_prefer_rc4": True,'
state: present
- name: set enc_level
@@ -235,7 +235,7 @@
lineinfile:
path: '/opt/appdata/{{pgrole}}/core.conf'
regexp: '"dont_count_slow_torrents".*'
line: '"dont_count_slow_torrents": true,'
line: '"dont_count_slow_torrents": True,'
state: present
- name: set max_active_seeding

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -68,7 +68,7 @@
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
- '{{ports.stdout}}{{extport3}}:{{intport3}}'
- '{{extport3}}:{{intport3}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -19,7 +19,6 @@
extport2: '6144'
intport3: '1443/tcp'
extport3: '1443'
image: 'linuxserver/domoticz:stable'
# CORE (MANDATORY) ############################################################
@@ -46,8 +45,7 @@
pg_env:
PUID: '1000'
PGID: '1000'
TZ: '${TZ}'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
@@ -58,7 +56,6 @@
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
- '{{ports.stdout}}{{extport3}}:{{intport3}}'
- '{{ports.stdout}}{{extport4}}:{{intport4}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped

64
apps/dozzle.yml Normal file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
#
# Title: Dozzle
# Author(s): Amir Raminfar (amir20)
# URL: https://dozzle.dev/ - https://github.com/amir20/dozzle
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# CORE (MANDATORY) DO NOT CHANGE ###########################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'dozzle'
intport: '8080'
extport: '8383'
image: 'amir20/dozzle'
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS #### KEEPS BOTTOM CLEAN ###########################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
DOZZLE_ADDR: ':8080'
DOZZLE_BASE: '/'
DOZZLE_LEVEL: 'info'
DOZZLE_TAILSIZE: '300'
# MAIN SCRIPT ##############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -14,7 +14,7 @@
- name: 'Set Known Facts'
set_fact:
pgrole: "embystats"
intport: "80"
intport: "5432"
extport: "9049"
image: "uping/embystat:beta-linux"

66
apps/filebot.yml Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/bash
#
# Title: PGBlitz (jlesage/filebot)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'filebot'
intport: '5800'
extport: '5804'
intport2: '5900'
extport2: '5903'
image: 'jlesage/filebot'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/storage:rw'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

81
apps/filezilla.yml Normal file
View File

@@ -0,0 +1,81 @@
#!/bin/bash
#
# Title: Filezilla for PGBlitz (OAuth security)
# Author(s): CasperVN
# URL: https://pgblitz.com - https://github.com/jlesage/docker-filezilla
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'filezilla'
intport: '5800'
extport: '5803'
image: 'jlesage/filezilla'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Including plugins'
include_tasks: '/opt/communityapps/apps/_plugins.yml'
- name: 'Including folders'
include_tasks: '/opt/communityapps/apps/_downloaders.yml'
- name: 'Ini Check'
stat:
path: /opt/appdata/{{pgrole}}/core.conf
register: inicheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/downloads:/storage:rw'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
UID: '1000'
GID: '1000'
DISPLAY_WIDTH: '1920'
DISPLAY_HEIGHT: '1080'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
##PG-Community
##PG-Community

97
apps/firefox.yml Normal file
View File

@@ -0,0 +1,97 @@
#!/bin/bash
#
# Title: firefox
# Author(s): timekills
# URL: https://plexguide.com - http://github.plexguide.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# CORE (MANDATORY) DO NOT CHANGE ###########################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'firefox'
intport: '5800'
extport: '5810'
# intport2: '25565'
# extport2: '25565'
image: 'jlesage/firefox'
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# EXTRA FUNCTIONS REQUIRED BY THE ROLE #####################################
- name: 'Create scripts directory for {{pgrole}}'
file:
path: /opt/appdata/{{pgrole}}/scripts
state: directory
owner: 1000
group: 1000
mode: 0755
- name: 'Create plugins directory for {{pgrole}}'
file:
path: /opt/appdata/{{pgrole}}/plugins
state: directory
owner: 1000
group: 1000
mode: 0755
# LABELS #### KEEPS BOTTOM CLEAN ###########################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
traefik.frontend.headers.SSLHost: '{{domain.stdout}}'
traefik.frontend.headers.SSLRedirect: 'true'
traefik.frontend.headers.STSIncludeSubdomains: 'true'
traefik.frontend.headers.STSPreload: 'true'
traefik.frontend.headers.STSSeconds: '315360000'
traefik.frontend.headers.browserXSSFilter: 'true'
traefik.frontend.headers.contentTypeNosniff: 'true'
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
traefik.frontend.headers.forceSTSHeader: 'true'
#traefik.frontend.headers.frameDeny: 'true'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config:rw'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- '/dev/shm:/dev/shm:rw'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: 1000
PGID: 1000
DISPLAY_WIDTH: 1600
DISPLAY_HEIGHT: 960
# MAIN SCRIPT ##############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

63
apps/flexget.yml Normal file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
#
# Title: FlexGet
# Author(s): paranoidi, Chase Sterling, cpoppema
# URL: https://flexget.com/ | https://github.com/cpoppema/docker-flexget
# GNU: MIT
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'flexget'
intport: '5050'
extport: '6060'
image: 'cpoppema/docker-flexget:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (digitalhigh/FlexTV)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -12,31 +12,15 @@
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'nzbthrottle'
intport: '0'
extport: '0'
image: 'daghaian/nzbthrottle'
pgrole: 'flextv'
intport: '80/tcp'
extport: '8987'
image: 'digitalhigh/flextv:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Checking {{pgrole}}'s json existance'
stat:
path: '/opt/communityapps/apps/templates/{{pgrole}}/config.json'
register: jsoncheck
- name: 'Copying file for {{pgrole}}'
copy:
src: '/opt/communityapps/apps/templates/{{pgrole}}/config.json'
dest: '/opt/appdata/{{pgrole}}/{{pgrole}}/config.json'
directory_mode: yes
force: yes
owner: '1000'
group: '1000'
mode: 0755
when: not jsoncheck.stat.exists
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
@@ -44,21 +28,20 @@
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}/config.json:/{{pgrole}}/config.json:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: Handbrake for PlexGuide
# Title: Handbrake for PGBlitz
# Author(s): timekills
# URL: https://plexguide.com - https://github.com/timekills
# URL: https://pgblitz.com - https://github.com/timekills
# GNU: General Public License v3.0
################################################################################
---
@@ -65,7 +65,7 @@
state: directory
owner: '1000'
group: '1000'
mode: 0755
mode: 0775
recurse: yes
- name: 'Create complete directory for {{pgrole}}'
@@ -74,7 +74,7 @@
state: directory
owner: '1000'
group: '1000'
mode: 0755
mode: 0775
recurse: yes
- name: 'Deploying {{pgrole}}'

View File

@@ -1,95 +0,0 @@
#!/bin/bash
#
# Title: Handbrake for PlexGuide Community (user/password)
# Author(s): timekills
# URL: https://plexguide.com - https://github.com/timekills
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'handbrake'
intport: '5800'
extport: '5800'
image: 'jlesage/handbrake:dev-latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.basic.users: "plex:$apr1$tosnCNtX$XKXnDaIiW7f0y1nwmd.KL0"
traefik.frontend.rule: 'Host:handbrake.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}/config:/config:rw'
- '/:/storage:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '{{path.stdout}}/{{pgrole}}/watch/Very_Fast_1080p30:/watch:rw'
- '{{path.stdout}}/{{pgrole}}/watch/HQ_1080p30_Surround:/watch2:rw'
- '{{path.stdout}}/{{pgrole}}/watch/1080mkv:/watch3:rw'
- '{{path.stdout}}/{{pgrole}}/complete/:/output:rw'
- '/dev/dri:/dev/dri:rw'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
USER_ID: '1000'
GROUP_ID: '1000'
AUTOMATED_CONVERSION_PRESET: "Very Fast 1080p30"
AUTOMATED_CONVERSION_FORMAT: "mp4"
AUTOMATED_CONVERSION_PRESET_2: "HQ 1080p30 Surround"
AUTOMATED_CONVERSION_FORMAT_2: "mp4"
AUTOMATED_CONVERSION_PRESET_3: "H.264 MKV 1080p30"
AUTOMATED_CONVERSION_FORMAT_3: "mkv"
# SECURE_CONNECTION: 1
# MAIN DEPLOYMENT #############################################################
- name: 'Create watch directory for {{pgrole}}'
file:
path: '{{path.stdout}}/handbrake/watch'
state: directory
owner: '1000'
group: '1000'
mode: 0755
recurse: yes
- name: 'Create complete directory for {{pgrole}}'
file:
path: '{{path.stdout}}/handbrake/complete'
state: directory
owner: '1000'
group: '1000'
mode: 0755
recurse: yes
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################

2
apps/image/nzbget Normal file
View File

@@ -0,0 +1,2 @@
linuxserver/nzbget
linuxserver/nzbget:testing

View File

@@ -0,0 +1,2 @@
linuxserver/unifi-controller:latest
linuxserver/unifi-controller:LTS

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Title: Jdownloader2 for PlexGuide (OAuth security) with OpenVPN integration
# Title: Jdownloader2 for PGBlitz (OAuth security) with OpenVPN integration
# Author(s): timekills (mod. h1f0x)
# URL: https://hub.docker.com/r/h1f0x/jd2-openvpn
# GNU: General Public License v3.0
@@ -49,12 +49,11 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs'
- '/mnt:/mnt'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- '/opt/appdata/{{pgrole}}/vpn:/vpn:rw'
- name: 'Setting PG ENV'
@@ -62,6 +61,8 @@
pg_env:
UID: '1000'
GID: '1000'
DISPLAY_WIDTH: '1600'
DISPLAY_HEIGHT: '960'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: Jdownloader2 for PlexGuide (OAuth security)
# Title: Jdownloader2 for PGBlitz (OAuth security)
# Author(s): timekills
# URL: https://plexguide.com - https://github.com/timekills/jdownloader2-for-Plexguide
# URL: https://pgblitz.com - https://github.com/timekills/jdownloader2-for-Plexguide
# GNU: General Public License v3.0
################################################################################
---
@@ -49,12 +49,11 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs'
- '/mnt:/mnt'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- name: 'Setting PG ENV'
set_fact:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -14,7 +14,7 @@
set_fact:
pgrole: 'logarr'
intport: '80'
extport: '7555'
extport: '7755'
image: 'monitorr/logarr:develop'
# CORE (MANDATORY) ############################################################

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: MakeMKV for PlexGuide
# Title: MakeMKV for PGBlitz
# Author(s): rla999
# URL: https://plexguide.com - https://github.com/rla999/makemkv-for-plexguide/
# URL: https://pgblitz.com - https://github.com/rla999/makemkv-for-plexguide/
# GNU: General Public License v3.0
################################################################################
---
@@ -36,11 +36,11 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}/downloads/{{pgrole}}/:/output:rw'
- name: 'Setting PG ENV'
set_fact:

68
apps/mariadb.yml Normal file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
#
# Title: MariaDB
# Author(s): MariaDB Foundation
# URL: https://mariadb.com - https://github.com/docker-library/mariadb
# GNU: General Public License v2.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# CORE (MANDATORY) DO NOT CHANGE ###########################################
- name: 'Set Known Facts'
set_fact:
pgrole: "mariadb"
intport: "3306"
extport: "6603"
image: "mariadb:latest"
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/var/lib/mysql'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
MYSQL_ROOT_PASSWORD: plexguide
# MAIN DEPLOYMENT ##############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
# POST DEPLOYMENT ##############################################################
- name: 'Post Deployment Notes'
debug:
msg: |-
* Login Information * root:plexguide * This should be changed *

View File

@@ -2,7 +2,7 @@
#
# Title: McMyadmin (v2)
# Author(s): timekills
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -15,7 +15,7 @@
set_fact:
pgrole: 'mcmyadmin'
intport: '8080'
extport: '8088'
extport: '8087'
image: 'linuxserver/mcmyadmin2'
- name: 'Including cron job'

67
apps/mediainfo.yml Normal file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
#
# Title: PGBlitz (jlesage/mediainfo)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'mediainfo'
intport: '5800'
extport: '5806'
intport2: '5900'
extport2: '5907'
image: 'jlesage/mediainfo:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs:rw'
- '/mnt:/mnt:rw'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -29,7 +29,6 @@
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.protocol: 'https'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -2,7 +2,7 @@
#
# Title: MKVToolNix
# Author(s): jlesage/timekills
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
# Docker: Docker image is available at: https://hub.docker.com/r/metabrainz/picard-website
################################################################################

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

402
apps/nzbget-mp4.yml Normal file
View File

@@ -0,0 +1,402 @@
#!/bin/bash
#
# NzbGet, with build in sickbeard_mp4_automator and ffmpeg build script
# Built for PGBlitz version 8.5.6
# Should be fine for versions above this too
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
#################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'nzbget'
intport: '6789'
extport: '6789'
image: 'linuxserver/nzbget'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Including folders'
include_tasks: '/opt/communityapps/apps/_downloaders.yml'
- name: Create nzb folder
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000'
with_items:
- '{{path.stdout}}/nzb'
# force: yes
- name: 'Including plugins'
include_tasks: '/opt/communityapps/apps/_plugins.yml'
- name: 'Checking for existing app data'
stat:
path: /opt/appdata/{{pgrole}}/nzbget.conf
register: confcheck
# EXTRAS FOR MP4 MODS ##########################################################
- name: 'Create {{pgrole}} mp4 directories'
file: 'path={{item}} state=directory mode=0775 owner=1000 group=1000 recurse=yes'
with_items:
- '/opt/appdata/{{pgrole}}'
- '/opt/appdata/{{pgrole}}/cont-init.d'
- '/opt/appdata/{{pgrole}}/installer'
- '/opt/appdata/{{pgrole}}/scripts'
- '/opt/appdata/{{pgrole}}/scripts/MP4_Automator'
- '/opt/appdata/{{pgrole}}/ffmpeg-build'
- '/opt/appdata/{{pgrole}}/services.d'
- name: 'Copy custom init scripts into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/cont-init.d/30-config
dest: /opt/appdata/{{pgrole}}/cont-init.d
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy custom install scripts into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/installer/installer.sh
dest: /opt/appdata/{{pgrole}}/installer
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy custom mp4 config into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/MP4_Automator/autoProcess.ini
dest: /opt/appdata/{{pgrole}}/scripts/MP4_Automator
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy custom NZBGetPostProcess script config into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/MP4_Automator/TEMPLATEPPScript
dest: /opt/appdata/{{pgrole}}/
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy ffmpeg build script into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/ffmpeg-build/web-install.sh
dest: /opt/appdata/{{pgrole}}/ffmpeg-build
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy ffmpeg build script into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/ffmpeg-build/build-ffmpeg
dest: /opt/appdata/{{pgrole}}/ffmpeg-build
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
- name: 'Copy custom init scripts into directory for {{pgrole}}'
copy:
src: /opt/communityapps/apps/templates/{{pgrole}}/services.d/run
dest: /opt/appdata/{{pgrole}}/services.d
directory_mode: yes
force: yes
owner: 1000
group: 1000
mode: 0775
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '/tmp:/tmp'
- '/opt/appdata/{{pgrole}}/cont-init.d:/etc/cont-init.d'
- '/opt/appdata/{{pgrole}}/services.d:/etc/services.d/nzbget'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
LC_ALL: 'C'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
# CONFIGURATION #############################################################
- name: 'Waiting for {{pgrole}} to initialize'
wait_for:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
state: present
delay: 5
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
- name: Set Main Location
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^MainDir\s*=.*'
line: 'MainDir=/config'
state: present
- name: Set download location
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^DestDir\s*=.*'
line: 'DestDir={{path.stdout}}/downloads/{{pgrole}}'
state: present
- name: Set incomplete location
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^InterDir\s*=.*'
line: 'InterDir={{path.stdout}}/incomplete/{{pgrole}}'
state: present
- name: Set TempDir
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^TempDir\s*=.*'
line: 'TempDir=/tmp'
state: present
- name: Set NzbDir Location
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^NzbDir\s*=.*'
line: 'NzbDir={{path.stdout}}/nzb'
state: present
- name: ScriptDir
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^ScriptDir\s*=.*'
line: 'ScriptDir=${MainDir}/scripts'
state: present
# FIRST TIME CONFIGURATION #############################################################
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: Lowercase & Set Movie Category
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category1.Name\s*=.*'
line: 'Category1.Name=movies'
state: present
- name: Set Location of Movies
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category1.DestDir\s*=.*'
line: 'Category1.DestDir='
state: present
- name: Set postprocess of Movies
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category1.Extensions\s*=.*'
line: 'Category1.Extensions=MP4_Automator/NZBGetPostProcess.py'
state: present
- name: Lowercase & Set TV Category
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category2.Name\s*=.*'
line: 'Category2.Name=tv'
state: present
- name: Set Location of TV
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category2.DestDir\s*=.*'
line: 'Category2.DestDir='
state: present
- name: Set postprocess of TV
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category2.Extensions\s*=.*'
line: 'Category2.Extensions=MP4_Automator/NZBGetPostProcess.py'
state: present
- name: Lowercase & Set Music Category
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category3.Name\s*=.*'
line: 'Category3.Name=music'
state: present
- name: Set Location of Music
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category3.DestDir\s*=.*'
line: 'Category3.DestDir='
state: present
- name: Lowercase & Set EBook Category
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category4.Name\s*=.*'
line: 'Category4.Name=ebooks'
state: present
- name: Set Location of EBooks
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Category4.DestDir\s*=.*'
line: 'Category4.DestDir='
state: present
- name: Lowercase & Set abook Category
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: 'Category5.Name\s*=.*'
line: 'Category5.Name=abooks'
state: present
- name: Set Location of aBooks
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: 'Category5.DestDir\s*=.*'
line: 'Category5.DestDir='
state: present
- name: Set Global Extensions
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^Extensions\s*=.*'
line: 'Extensions=unzip.py'
state: present
- name: Set ScriptOrder
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^ScriptOrder\s*=.*'
line: 'ScriptOrder=unzip.py, MP4_Automator/NZBGetPostProcess.py'
state: present
- name: Set mp4 script location
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^MP4_Automator/NZBGetPostProcess.py:MP4_FOLDER\s*=.*'
line: 'MP4_Automator/NZBGetPostProcess.py:MP4_FOLDER=/config/scripts/MP4_Automator/'
state: present
- name: Set mp4 conversion true
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^MP4_Automator/NZBGetPostProcess.py:SHOULDCONVERT\s*=.*'
line: 'MP4_Automator/NZBGetPostProcess.py:SHOULDCONVERT=True'
state: present
- name: Default User
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^ControlUsername\s*=.*'
line: 'ControlUsername='
state: present
- name: Default Password
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: 'ControlPassword\s*=.*'
line: 'ControlPassword='
state: present
- name: DirectUnpack Set to On
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^DirectUnpack\s*=.*'
line: 'DirectUnpack=yes'
state: present
- name: HealthCheck
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^HealthCheck\s*=.*'
line: 'HealthCheck=Delete'
state: present
- name: Set DiskSpace
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '^DiskSpace\s*=.*'
line: 'DiskSpace=25000'
state: present
- name: Remove Generic Task
lineinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
regexp: '{{ item.regexp }}'
state: absent
with_items:
- { regexp: '.Task1\.Time\=' }
- { regexp: '.Task1\.WeekDays\=' }
- { regexp: '.Task1\.Command\=' }
- { regexp: '.Task1\.Param\=' }
- name: Unpause
blockinfile:
path: '/opt/appdata/{{pgrole}}/nzbget.conf'
block: |
Task1.Time=*,*:00,*:30
Task1.WeekDays=1-7
Task1.Command=UnpauseDownload
Task1.Param=
insertafter: '^### SCHEDULER'
when: not confcheck.stat.exists
- name: Restart {{pgrole}}
docker_container:
name: '{{pgrole}}'
state: started

80
apps/ombi4k.yml Normal file
View File

@@ -0,0 +1,80 @@
#!/bin/bash
#
# Title: Ombi4k (Reference Title File)
# Author(s): Admin9705; timekills mod
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'ombi4k'
intport: '3579'
extport: '3580'
image: 'linuxserver/ombi'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/coreapps/apps/_core.yml'
# PRETASKS ####################################################################
- name: Check JSON exists
stat:
path: '/opt/appdata/{{pgrole}}/appsettings.json'
register: jsonfile
- name: 'Download {{pgrole}} appsettings.json config file'
get_url:
url: https://raw.githubusercontent.com/tidusjar/Ombi/master/src/Ombi/appsettings.json
dest: /opt/appdata/{{pgrole}}/appsettings.json
owner: '1000'
group: '1000'
force: no
ignore_errors: True
when: jsonfile.stat.exists == False
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- '/opt/appdata/{{pgrole}}/appsettings.json:/opt/{{pgrole}}/appsettings.json'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

80
apps/ombiHDR.yml Normal file
View File

@@ -0,0 +1,80 @@
#!/bin/bash
#
# Title: OmbiHDR
# Author(s): Admin9705; timekills mod
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'ombiHDR'
intport: '3579'
extport: '3581'
image: 'linuxserver/ombi'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/coreapps/apps/_core.yml'
# PRETASKS ####################################################################
- name: Check JSON exists
stat:
path: '/opt/appdata/{{pgrole}}/appsettings.json'
register: jsonfile
- name: 'Download {{pgrole}} appsettings.json config file'
get_url:
url: https://raw.githubusercontent.com/tidusjar/Ombi/master/src/Ombi/appsettings.json
dest: /opt/appdata/{{pgrole}}/appsettings.json
owner: '1000'
group: '1000'
force: no
ignore_errors: True
when: jsonfile.stat.exists == False
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- '/opt/appdata/{{pgrole}}/appsettings.json:/opt/{{pgrole}}/appsettings.json'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -29,6 +29,16 @@
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
traefik.frontend.headers.SSLHost: '{{domain.stdout}}'
traefik.frontend.headers.SSLRedirect: 'true'
traefik.frontend.headers.STSIncludeSubdomains: 'true'
traefik.frontend.headers.STSPreload: 'true'
traefik.frontend.headers.STSSeconds: '315360000'
traefik.frontend.headers.browserXSSFilter: 'true'
traefik.frontend.headers.contentTypeNosniff: 'true'
traefik.frontend.headers.customResponseHeaders: 'X-Robots-Tag:noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
traefik.frontend.headers.forceSTSHeader: 'true'
traefik.frontend.headers.frameDeny: 'true'
- name: 'Setting PG Volumes'
set_fact:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

356
apps/qbittorrent-vpn.yml Normal file
View File

@@ -0,0 +1,356 @@
#!/bin/bash
#
# Title: qBittorrent (with OpenVPN and Privoxy)
# Author(s): Mike Tzou (Chocobo1), Vladimir Golovnev (glassez), Diego Heras (ngosang), binhex
# URL: https://www.qbittorrent.org/ - https://github.com/binhex/arch-qbittorrentvpn
# GNU: General Public License v2.0 (w/ exception)
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'qbittorrent'
intport: '8998'
extport: '8998'
intport1: '8118'
extport1: '8118'
intport2: '6881'
extport2: '6881'
dnsserver1: '1.1.1.1'
dnsserver2: '84.200.69.80'
dnsserver3: '37.235.1.174'
dnsserver4: '185.121.177.177'
puid: '1000'
pgid: '1000'
image: 'binhex/arch-qbittorrentvpn:latest'
# CORE (MANDATORY) #############################################################
- name: 'Including cron job'
include_tasks: '/opt/coreapps/apps/_core.yml'
- name: 'Including folders'
include_tasks: '/opt/coreapps/apps/_downloaders.yml'
- name: 'Including plugins'
include_tasks: '/opt/coreapps/apps/_plugins.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '{{puid}}'
PGID: '{{pgid}}'
UMASK: '000'
VPN_ENABLED: 'no'
VPN_USER: 'username'
VPN_PASS: 'password'
VPN_PROV: 'custom'
VPN_OPTIONS: ''
STRICT_PORT_FORWARD: 'no'
ENABLE_PRIVOXY: 'no'
LAN_NETWORK: '127.20.0.0/16'
NAME_SERVERS: '{{dnsserver1}},{{dnsserver2}},{{dnsserver3}},{{dnsserver4}}'
DEBUG: 'false'
WEBUI_PORT: '{{intport}}'
# MAIN DEPLOYMENT #############################################################
- name: 'Checking for existing app data'
stat:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
register: confcheck
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport1}}:{{intport1}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
devices:
- '/dev/net/tun:/dev/net/tun:rwm'
dns_servers:
- '{{dnsserver1}}'
- '{{dnsserver2}}'
- '{{dnsserver3}}'
- '{{dnsserver4}}'
capabilities:
- NET_ADMIN
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
# CONFIGURATION ####################################################
- name: 'Waiting for {{pgrole}} to initialize'
wait_for:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
state: present
timeout: 15
delay: 5
- name: 'Stopping {{pgrole}}'
docker_container:
name: '{{pgrole}}'
state: stopped
- name: Set SavePath
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Downloads\SavePath
value: '{{path.stdout}}/downloads/{{pgrole}}'
state: present
- name: Set TempPathEnabled
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Downloads\TempPathEnabled
value: True
state: present
- name: Get latest blocklist
shell: curl -L http://john.bitsurge.net/public/biglist.p2p.gz | gzip -cdf > /opt/appdata/{{pgrole}}/qBittorrent/config/biglist.p2p
- name: 'Checking for existing openvpn folder'
stat:
path: '/opt/appdata/{{pgrole}}/openvpn'
register: ovpncheck
- name: Initialize opvn
block:
- name: Create opvn folder
shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OVPN\ files\ go\ here && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn
when: not ovpncheck.stat.exists
# FIRST TIME CONFIGURATION ####################################################
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: Enable AutoRun
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: AutoRun
option: enabled
value: True
state: present
- name: Enable Auto UnRar
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: AutoRun
option: program
value: '/usr/bin/unrar x -r \"%F/.\" \"%F/\"'
state: present
- name: Disable DHT
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\DHT
value: false
state: present
- name: Disable PeX
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\PeX
value: false
state: present
- name: Disable LSD
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\LSD
value: false
state: present
- name: Enable Encryption
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\Encryption
value: 1
state: present
- name: Don't use incomplete extension
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Downloads\UseIncompleteExtension
value: false
state: present
- name: Ignore slow torrents
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Queueing\IgnoreSlowTorrents
value: True
state: present
- name: Set MaxActiveDownloads
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Queueing\MaxActiveDownloads
value: 10
state: present
- name: Set MaxActiveTorrents
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Queueing\MaxActiveTorrents
value: 100
state: present
- name: Set MaxActiveUploads
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Queueing\MaxActiveUploads
value: 100
state: present
- name: Set GlobalMaxSeedingMinutes
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: BitTorrent
option: Session\GlobalMaxSeedingMinutes
value: 20160
state: present
- name: Set MaxRatio
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\MaxRatio
value: 1
state: present
- name: pause on MaxRatioAction
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Bittorrent\MaxRatioAction
value: 1
state: present
- name: Disable csrf
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\CSRFProtection
value: false
force: yes
state: present
- name: Disable HostHeaderValidation
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\HostHeaderValidation
value: false
force: yes
state: present
- name: Disable ClickjackingProtection
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\ClickjackingProtection
value: false
force: yes
state: present
- name: Set ServerDomains
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\ServerDomains
value: '*'
force: yes
state: present
- name: Set Address
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\Address
value: '*'
force: yes
state: present
- name: Set Port
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Connection\PortRangeMin
value: '{{intport2}}'
force: yes
state: present
- name: Set torrent Watch folder
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: Downloads\ScanDirsV2
value: '@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0$\0/\0m\0n\0t\0/\0t\0o\0r\0r\0\x65\0n\0t\0/\0w\0\x61\0t\0\x63\0h\0\0\0\x2\0\0\0\0)'
force: yes
state: present
- name: Set Blocklist enabled
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: IPFilter\Enabled
value: 'true'
force: yes
state: present
- name: Set Blocklist location
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: IPFilter\File
value: '/config/qBittorrent/config/biglist.p2p'
force: yes
state: present
- name: Set default login
ini_file:
path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf'
section: Preferences
option: WebUI\Password_ha1
value: '@ByteArray(22f616dbc8cdb4aa96105b1c8f36ea63)'
force: yes
state: present
when: not confcheck.stat.exists
- name: Restart {{pgrole}}
docker_container:
name: '{{pgrole}}'
state: started

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -33,10 +33,10 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -33,10 +33,10 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:

67
apps/rclonebrowser.yml Normal file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
#
# Title: PGBlitz (rclone browser)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'rclonebrowser'
intport: '5800'
extport: '5808'
intport2: '5900'
extport2: '5909'
image: 'romancin/rclonebrowser:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs:rw'
- '/mnt:/mnt:rw'
- '/opt/appdata/plexguide:/host_rcloneconf_folder:ro'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

70
apps/rdp-calibre.yml Normal file
View File

@@ -0,0 +1,70 @@
#!/bin/bash
#
# Title: PGBlitz (rdp-calibre)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'rdp-calibre'
intport: '8080'
extport: '8089'
intport2: '8081'
extport2: '8090'
image: 'aptalca/docker-rdp-calibre:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config:rw'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs:rw'
- '/mnt:/mnt:rw'
- '/etc/localtime:/etc/localtime:ro'
- '/mnt/unionfs/libary:/library:rw'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
WIDTH: '1280'
HEIGHT: '720'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,10 +1,10 @@
#!/bin/bash
#
# GitHub: https://github.com/Admin9705/PlexGuide.com-The-Awesome-Plex-Server
# GitHub: https://github.com/PGBlitz/PGBlitz.com
# Author: Admin9705
# URL: https://plexguide.com
# URL: https://pgblitz.com
#
# PlexGuide Copyright (C) 2018 PlexGuide.com
# PGBlitz Copyright (C) 2018 PGBlitz.com
# Licensed under GNU General Public License v3.0 GPL-3 (in short)
#
# You may copy, distribute and modify the software as long as you track

76
apps/rflood-vpn.yml Normal file
View File

@@ -0,0 +1,76 @@
#!/bin/bash
#
# Title: rTorrent + FloodUI integrated OpenVPN
# Author(s): h1f0x
# URL: https://github.com/h1f0x/rtorrent-flood-openvpn
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'rflood'
intport: '80'
extport: '5896'
image: 'h1f0x/rtorrent-flood-openvpn'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Including plugins'
include_tasks: '/opt/communityapps/apps/_plugins.yml'
- name: 'Including folders'
include_tasks: '/opt/communityapps/apps/_downloaders.yml'
- name: 'Ini Check'
stat:
path: /opt/appdata/{{pgrole}}/core.conf
register: inicheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:
pg_env:
UID: 1000
GID: 1000
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
privileged: yes
state: started
labels: '{{pg_labels}}'

77
apps/rutorrent-vpn.yml Normal file
View File

@@ -0,0 +1,77 @@
#!/bin/bash
#
# Title: rTorrent + ruTorrent integrated OpenVPN
# Author(s): h1f0x
# URL: https://github.com/h1f0x/rtorrent-flood-openvpn
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'rutorrent-vpn'
intport: '80'
extport: '5897'
image: 'h1f0x/rtorrent-rutorrent-openvpn'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Including plugins'
include_tasks: '/opt/communityapps/apps/_plugins.yml'
- name: 'Including folders'
include_tasks: '/opt/communityapps/apps/_downloaders.yml'
- name: 'Ini Check'
stat:
path: /opt/appdata/{{pgrole}}/core.conf
register: inicheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '/opt/appdata/{{pgrole}}/sock:/run/php'
- name: 'Setting PG ENV'
set_fact:
pg_env:
UID: '1000'
GID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
privileged: yes
state: started
labels: '{{pg_labels}}'

View File

@@ -1,10 +1,10 @@
#!/bin/bash
#
# GitHub: https://github.com/Admin9705/PlexGuide.com-The-Awesome-Plex-Server
# GitHub: https://github.com/PGBlitz/PGBlitz.com
# Author: Admin9705
# URL: https://plexguide.com
# URL: https://pgblitz.com
#
# PlexGuide Copyright (C) 2018 PlexGuide.com
# PGBlitz Copyright (C) 2018 PGBlitz.com
# Licensed under GNU General Public License v3.0 GPL-3 (in short)
#
# You may copy, distribute and modify the software as long as you track

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -34,10 +34,10 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -16,7 +16,7 @@
pgrole: 'sonarrhdr'
intport: '8989'
extport: '8987'
image: 'lsiodev/sonarr-preview'
image: 'linuxserver/sonarr:preview'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
@@ -34,10 +34,10 @@
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting PG ENV'
set_fact:

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

63
apps/subsonic.yml Normal file
View File

@@ -0,0 +1,63 @@
#!/bin/bash
#
# Title: PGBlitz (danisla/subsonic)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'subsonic'
intport: '4040'
extport: '4040'
image: 'danisla/subsonic'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}/state:/opt/app/state:rw'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/mnt/music:ro'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
@@ -48,7 +48,7 @@
pg_env:
UID: '1000'
GID: '1000'
DOMAIN: {{pgrole}}.{{domain.stdout}}
DOMAIN: '{{pgrole}}.{{domain.stdout}}'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

86
apps/teamspeak3.yml Normal file
View File

@@ -0,0 +1,86 @@
#!/bin/bash
#
# Title: Teamspeak 3 Alpine
# Author(s): N1ghtshade
# URL: https://plexguide.com - http://github.plexguide.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'teamspeak3'
intport: '9987/udp'
extport: '9987'
intport2: '10011/tcp'
extport2: '10011'
intport3: '30033/tcp'
extport3: '30033'
image: 'qmcgaw/teamspeak3-alpine:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# EXTRA FOR TS3 #########################################################
- name: 'Create {{pgrole}} data and log directories'
file: 'path={{item}} state=directory mode=0700 owner=1000 group=1000 recurse=yes'
with_items:
- '/opt/appdata/{{pgrole}}'
- '/opt/appdata/{{pgrole}}/data'
- '/opt/appdata/{{pgrole}}/logs'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'false'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
# VOLUMES #########
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}/data:/data'
- '/opt/appdata/{{pgrole}}/logs:/logs'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{extport}}:{{intport}}'
- '{{extport2}}:{{intport2}}'
- '{{extport3}}:{{intport3}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
command: license_accepted=1
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
# ENDING TASK FOR TS3 ####################################################
- name: 'Configuring {{pgrole}} for first time use'
block:
- name: 'Wait 30 Seconds'
wait_for:
timeout: 30

View File

@@ -0,0 +1 @@
admin:$1$4fd0ad31$.cId7p1uxI4a.RcrH81On0:DokuWiki Administrator:mail@host.com:admin,user

View File

@@ -0,0 +1,244 @@
#!/usr/bin/env python
#
##############################################################################
### NZBGET POST-PROCESSING SCRIPT ###
# Modified to enable multiple bypass categories,
# as per: https://github.com/mdhiggins/sickbeard_mp4_automator/issues/509
#
# Converts files and passes them to Sonarr for further processing.
#
# NOTE: This script requires Python to be installed on your system.
##############################################################################
### OPTIONS ###
# Change to full path to MP4 Automator folder. No quotes and a trailing /
#MP4_FOLDER=~/sickbeard_mp4_automator/
# Convert file before passing to destination (True, False)
#SHOULDCONVERT=False
# Category for Couchpotato
#CP_CAT=Couchpotato
# Category for Sonarr
#SONARR_CAT=Sonarr
# Category for Radarr
#RADARR_CAT=Radarr
# Category for Sickbeard
#SICKBEARD_CAT=Sickbeard
# Category for Sickrage
#SICKRAGE_CAT=Sickrage
# Category list (comma seperated) for bypassing any further processing but still converting
#BYPASS_CAT=tv,movies
# Custom output_directory setting
#OUTPUT_DIR=
### NZBGET POST-PROCESSING SCRIPT ###
##############################################################################
import os
import sys
import re
import json
import traceback
# Sanity checks for path string
MP4folder = os.environ['NZBPO_MP4_FOLDER'].strip()
MP4folder = MP4folder.replace('"', '')
MP4folder = MP4folder.replace("'", "")
MP4folder = MP4folder.replace("\\", "/")
if not(MP4folder.endswith("/")):
MP4folder += "/"
#DEBUG#print MP4folder+" the original is "+os.environ['NZBPO_MP4_FOLDER']
output_dir = None
if 'NZBPO_OUTPUT_DIR' in os.environ:
output_dir = os.environ['NZBPO_OUTPUT_DIR'].strip()
if len(output_dir) > 0:
output_dir = output_dir.replace('"', '')
output_dir = output_dir.replace("'", "")
output_dir = output_dir.replace("\\", "/")
if not(output_dir.endswith("/")):
output_dir += "/"
#DEBUG#print Overriding output directory
sys.path.append(MP4folder)
try:
from readSettings import ReadSettings
from mkvtomp4 import MkvtoMp4
from autoprocess import autoProcessMovie, autoProcessTV, autoProcessTVSR, sonarr, radarr
import logging
from logging.config import fileConfig
except ImportError:
print("[ERROR] Wrong path to sickbeard_mp4_automator: " + os.environ['NZBPO_MP4_FOLDER'])
print("[ERROR] %s" % traceback.print_exc())
sys.exit(0)
# Setup Logging
logpath = '/var/log/sickbeard_mp4_automator'
if os.name == 'nt':
logpath = MP4folder
elif not os.path.isdir(logpath):
try:
os.mkdir(logpath)
except:
logpath = MP4folder
configPath = os.path.abspath(os.path.join(MP4folder, 'logging.ini')).replace("\\", "\\\\")
logPath = os.path.abspath(os.path.join(logpath, 'index.log')).replace("\\", "\\\\")
fileConfig(configPath, defaults={'logfilename': logPath})
log = logging.getLogger("NZBGetPostProcess")
# Determine if conversion will take place
shouldConvert = (os.environ['NZBPO_SHOULDCONVERT'].lower() in ("yes", "true", "t", "1"))
if 'NZBOP_SCRIPTDIR' in os.environ and not os.environ['NZBOP_VERSION'][0:5] < '11.0':
log.info("Script triggered from NZBGet (11.0 or later).")
path = os.environ['NZBPP_DIRECTORY'] # Path to NZB directory
nzb = os.environ['NZBPP_NZBFILENAME'] # Original NZB name
category = os.environ['NZBPP_CATEGORY'] # NZB Category to determine destination
#DEBUG#print "Category is %s." % category
couchcat = os.environ['NZBPO_CP_CAT'].lower()
sonarrcat = os.environ['NZBPO_SONARR_CAT'].lower()
radarrcat = os.environ['NZBPO_RADARR_CAT'].lower()
sickbeardcat = os.environ['NZBPO_SICKBEARD_CAT'].lower()
sickragecat = os.environ['NZBPO_SICKRAGE_CAT'].lower()
bypass = os.environ['NZBPO_BYPASS_CAT'].lower().replace(' ','').split(',')
categories = [sickbeardcat, couchcat, sonarrcat, radarrcat, sickragecat]
log.debug("Path: %s" % path)
log.debug("NZB: %s" % nzb)
log.debug("Category: %s" % category)
log.debug("Categories: %s" % categories)
# NZBGet argv: all passed as environment variables.
clientAgent = "nzbget"
# Exit codes used by NZBGet
POSTPROCESS_PARCHECK = 92
POSTPROCESS_SUCCESS = 93
POSTPROCESS_ERROR = 94
POSTPROCESS_NONE = 95
# Check nzbget.conf options
status = 0
if os.environ['NZBOP_UNPACK'] != 'yes':
log.error("Please enable option \"Unpack\" in nzbget configuration file, exiting.")
sys.exit(POSTPROCESS_NONE)
# Check par status
if os.environ['NZBPP_PARSTATUS'] == '3':
log.error("Par-check successful, but Par-repair disabled, exiting")
sys.exit(POSTPROCESS_NONE)
if os.environ['NZBPP_PARSTATUS'] == '1':
log.error("Par-check failed, setting status \"failed\".")
status = 1
sys.exit(POSTPROCESS_NONE)
# Check unpack status
if os.environ['NZBPP_UNPACKSTATUS'] == '1':
log.error("Unpack failed, setting status \"failed\".")
status = 1
sys.exit(POSTPROCESS_NONE)
if os.environ['NZBPP_UNPACKSTATUS'] == '0' and os.environ['NZBPP_PARSTATUS'] != '2':
# Unpack is disabled or was skipped due to nzb-file properties or due to errors during par-check
for dirpath, dirnames, filenames in os.walk(os.environ['NZBPP_DIRECTORY']):
for file in filenames:
fileExtension = os.path.splitext(file)[1]
if fileExtension in ['.par2']:
log.error("Post-Process: Unpack skipped and par-check skipped (although par2-files exist), setting status \"failed\".")
status = 1
break
if os.path.isfile(os.path.join(os.environ['NZBPP_DIRECTORY'], "_brokenlog.txt")) and not status == 1:
log.error("Post-Process: _brokenlog.txt exists, download is probably damaged, exiting.")
status = 1
if not status == 1:
log.error("Neither par2-files found, _brokenlog.txt doesn't exist, considering download successful.")
# Check if destination directory exists (important for reprocessing of history items)
if not os.path.isdir(os.environ['NZBPP_DIRECTORY']):
log.error("Post-Process: Nothing to post-process: destination directory ", os.environ['NZBPP_DIRECTORY'], "doesn't exist.")
status = 1
sys.exit(POSTPROCESS_NONE)
# Make sure one of the appropriate categories is set
if category.lower() not in categories and category.lower() not in bypass:
log.error("Post-Process: No valid category detected. Category was %s." % (category))
status = 1
sys.exit(POSTPROCESS_NONE)
# Make sure there are no duplicate categories
if len(categories) != len(set(categories)):
log.error("Duplicate category detected. Category names must be unique.")
status = 1
sys.exit(POSTPROCESS_NONE)
# All checks done, now launching the script.
settings = ReadSettings(MP4folder, "autoProcess.ini")
if shouldConvert:
if output_dir:
settings.output_dir = output_dir
converter = MkvtoMp4(settings, logger=log)
for r, d, f in os.walk(path):
for files in f:
inputfile = os.path.join(r, files)
#DEBUG#print inputfile
#Ignores files under 50MB
if os.path.getsize(inputfile) > 50000000:
if MkvtoMp4(settings, logger=log).validSource(inputfile):
try:
output = converter.process(inputfile)
log.info("Successfully processed %s." % inputfile)
except:
log.exception("File processing failed.")
if converter.output_dir:
path = converter.output_dir
if (category.lower() == categories[0]):
#DEBUG#print "Sickbeard Processing Activated"
autoProcessTV.processEpisode(path, settings, nzb)
sys.exit(POSTPROCESS_SUCCESS)
elif (category.lower() == categories[1]):
#DEBUG#print "CouchPotato Processing Activated"
autoProcessMovie.process(path, settings, nzb, status)
sys.exit(POSTPROCESS_SUCCESS)
elif (category.lower() == categories[2]):
#DEBUG#print "Sonarr Processing Activated"
success = sonarr.processEpisode(path, settings, True)
if success:
sys.exit(POSTPROCESS_SUCCESS)
else:
sys.exit(POSTPROCESS_ERROR)
elif (category.lower() == categories[3]):
#DEBUG#print "Radarr Processing Activated"
success = radarr.processMovie(path, settings, True)
if success:
sys.exit(POSTPROCESS_SUCCESS)
else:
sys.exit(POSTPROCESS_ERROR)
elif (category.lower() == categories[4]):
#DEBUG#print "Sickrage Processing Activated"
autoProcessTVSR.processEpisode(path, settings, nzb)
sys.exit(POSTPROCESS_SUCCESS)
elif (category.lower() in bypass):
#DEBUG#print "Bypass Further Processing"
sys.exit(POSTPROCESS_NONE)
else:
log.error("This script can only be called from NZBGet (11.0 or later).")
sys.exit(0)

View File

@@ -0,0 +1,144 @@
[SickBeard]
host = sickbeard
port = 8081
username =
password =
web_root =
ssl = False
api_key =
[Sonarr]
host = sonarr
port = 8989
web_root =
ssl = False
apikey =
[Radarr]
host = radarr
port = 7878
web_root =
ssl = False
apikey =
[MP4]
ffmpeg = /config/ffmpeg-build/workspace/bin/ffmpeg
ffprobe = /config/ffmpeg-build/workspace/bin/ffprobe
threads = 0
output_directory =
copy_to =
move_to =
output_extension = mp4
output_format = mp4
delete_original = True
relocate_moov = True
video-codec = h264,x264
video-bitrate =
video-crf = 18
video-max-width =
h264-max-level = 4.1
use-qsv-decoder-with-encoder = True
use-hevc-qsv-decoder = False
ios-audio = libfdk_aac
ios-first-track-only = False
ios-audio-filter = dynaudnorm
max-audio-channels =
audio-codec = ac3,mp3,dts,dca,aac,libfdk_aac
audio-language = eng
audio-default-language = eng
audio-channel-bitrate = 256
audio-filter =
subtitle-codec = srt
subtitle-language = eng
subtitle-default-language =
subtitle-encoding =
fullpathguess = True
convert-mp4 = False
tagfile = True
tag-language = en
download-artwork = Poster
download-subs = True
embed-subs = False
sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt =
aac_adtstoasc = False
postopts = -preset,slower
preopts =
audio-copy-original = False
enable_dxva2_gpu_decode = False
ios-move-last = False
use-hevc-qsv-decoder = False
embed-only-internal-subs = False
audio-first-track-of-language = False
video-profile =
[CouchPotato]
host = couchpotato
port = 5050
username =
password =
web_root =
ssl = False
apikey =
delay = 65
method = renamer
delete_failed = False
[uTorrent]
convert =
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sonarr-label = sonarr
bypass-label = bypass
sickrage-label = sickrage
webui = False
action_before = stop
action_after = removedata
host = http://utorrent:8080/
username =
password =
output_directory =
radarr-label = radarr
[Deluge]
host = deluge
username =
convert = True
password =
sonarr-label = sonarr
radarr-label = radarr
bypass-label = bypass
sickbeard-label = sickbeard
port = 12569
sickrage-label = sickrage
couchpotato-label = couchpotato
output_directory =
remove = true
[SABNZBD]
convert = True
sickrage-category = sickrage
sonarr-category = sonarr
radarr-category = radarr
bypass-category = bypass
couchpotato-category = couchpotato
sickbeard-category = sickbeard
output_directory =
[Sickrage]
host = sickrage
port = 8081
username =
password =
web_root =
ssl = False
api_key =
[Plex]
host = plex
port = 32400
refresh = False
token =

View File

@@ -0,0 +1,27 @@
#!/usr/bin/with-contenv bash
# delete lock file if found
[[ -f /downloads/nzbget.lock ]] && \
rm /downloads/nzbget.lock
# check if config file exists in /config
[[ ! -f /config/nzbget.conf ]] && \
cp /defaults/nzbget.conf /config/nzbget.conf
# permissions
chown 1000:1000 \
/downloads
chown 1000:1000 -R \
/app/nzbget \
/config
chmod u+rw \
/config/nzbget.conf
chmod 777 -R \
/config
chmod 777 -R \
/app/nzbget
chmod 777 -R \
/downloads
exec /config/installer/installer.sh

View File

@@ -0,0 +1,400 @@
#!/bin/bash
# https://github.com/markus-perl/ffmpeg-build-script
VERSION=1.1
CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
CC=clang
LDFLAGS="-L${WORKSPACE}/lib -lm"
CFLAGS="-I${WORKSPACE}/include"
PKG_CONFIG_PATH="${WORKSPACE}/lib/pkgconfig"
ADDITIONAL_CONFIGURE_OPTIONS=""
# Speed up the process
# Env Var NUMJOBS overrides automatic detection
if [[ -n $NUMJOBS ]]; then
MJOBS=$NUMJOBS
elif [[ -f /proc/cpuinfo ]]; then
MJOBS=$(grep -c processor /proc/cpuinfo)
elif [[ "$OSTYPE" == "darwin"* ]]; then
MJOBS=$(sysctl -n machdep.cpu.thread_count)
ADDITIONAL_CONFIGURE_OPTIONS="--enable-videotoolbox"
else
MJOBS=4
fi
make_dir () {
if [ ! -d $1 ]; then
if ! mkdir $1; then
printf "\n Failed to create dir %s" "$1";
exit 1
fi
fi
}
remove_dir () {
if [ -d $1 ]; then
rm -r "$1"
fi
}
download () {
DOWNLOAD_PATH=$PACKAGES;
if [ ! -z "$3" ]; then
mkdir -p $PACKAGES/$3
DOWNLOAD_PATH=$PACKAGES/$3
fi;
if [ ! -f "$DOWNLOAD_PATH/$2" ]; then
echo "Downloading $1"
curl -L --silent -o "$DOWNLOAD_PATH/$2" "$1"
EXITCODE=$?
if [ $EXITCODE -ne 0 ]; then
echo ""
echo "Failed to download $1. Exitcode $EXITCODE. Retrying in 10 seconds";
sleep 10
curl -L --silent -o "$DOWNLOAD_PATH/$2" "$1"
fi
EXITCODE=$?
if [ $EXITCODE -ne 0 ]; then
echo ""
echo "Failed to download $1. Exitcode $EXITCODE";
exit 1
fi
echo "... Done"
if ! tar -xvf "$DOWNLOAD_PATH/$2" -C "$DOWNLOAD_PATH" 2>/dev/null >/dev/null; then
echo "Failed to extract $2";
exit 1
fi
fi
}
execute () {
echo "$ $*"
OUTPUT=$($@ 2>&1)
if [ $? -ne 0 ]; then
echo "$OUTPUT"
echo ""
echo "Failed to Execute $*" >&2
exit 1
fi
}
build () {
echo ""
echo "building $1"
echo "======================="
if [ -f "$PACKAGES/$1.done" ]; then
echo "$1 already built. Remove $PACKAGES/$1.done lockfile to rebuild it."
return 1
fi
return 0
}
command_exists() {
if ! [[ -x $(command -v "$1") ]]; then
return 1
fi
return 0
}
build_done () {
touch "$PACKAGES/$1.done"
}
echo "ffmpeg-build-script v$VERSION"
echo "========================="
echo ""
case "$1" in
"--cleanup")
remove_dir $PACKAGES
remove_dir $WORKSPACE
echo "Cleanup done."
echo ""
exit 0
;;
"--build")
;;
*)
echo "Usage: $0"
echo " --build: start building process"
echo " --cleanup: remove all working dirs"
echo " --help: show this help"
echo ""
exit 0
;;
esac
echo "Using $MJOBS make jobs simultaneously."
make_dir $PACKAGES
make_dir $WORKSPACE
export PATH=${WORKSPACE}/bin:$PATH
if ! command_exists "make"; then
echo "make not installed.";
exit 1
fi
if ! command_exists "g++"; then
echo "g++ not installed.";
exit 1
fi
if ! command_exists "curl"; then
echo "curl not installed.";
exit 1
fi
if build "yasm"; then
download "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz" "yasm-1.3.0.tar.gz"
cd $PACKAGES/yasm-1.3.0 || exit
execute ./configure --prefix=${WORKSPACE}
execute make -j $MJOBS
execute make install
build_done "yasm"
fi
if build "nasm"; then
download "http://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz" "nasm.tar.gz"
cd $PACKAGES/nasm-2.14.02 || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
build_done "nasm"
fi
if build "opencore"; then
download "http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencore-amr%2Ffiles%2Fopencore-amr%2F&ts=1442256558&use_mirror=netassist" "opencore-amr-0.1.5.tar.gz"
cd $PACKAGES/opencore-amr-0.1.5 || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
build_done "opencore"
fi
if build "libvpx"; then
download "https://github.com/webmproject/libvpx/archive/v1.7.0.tar.gz" "libvpx-1.7.0.tar.gz"
cd $PACKAGES/libvpx-*0 || exit
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Applying Darwin patch"
sed "s/,--version-script//g" build/make/Makefile > build/make/Makefile.patched
sed "s/-Wl,--no-undefined -Wl,-soname/-Wl,-undefined,error -Wl,-install_name/g" build/make/Makefile.patched > build/make/Makefile
fi
execute ./configure --prefix=${WORKSPACE} --disable-unit-tests --disable-shared
execute make -j $MJOBS
execute make install
build_done "libvpx"
fi
if build "lame"; then
download "http://kent.dl.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz" "lame-3.100.tar.gz"
cd $PACKAGES/lame-3.100 || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
build_done "lame"
fi
if build "xvidcore"; then
download "http://downloads.xvid.org/downloads/xvidcore-1.3.4.tar.gz" "xvidcore-1.3.4.tar.gz"
cd $PACKAGES/xvidcore || exit
cd build/generic || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
if [[ -f ${WORKSPACE}/lib/libxvidcore.4.dylib ]]; then
execute rm "${WORKSPACE}/lib/libxvidcore.4.dylib"
fi
build_done "xvidcore"
fi
if build "x264"; then
download "http://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20190204-2245-stable.tar.bz2" "last_x264.tar.bz2"
cd $PACKAGES/x264-snapshot-* || exit
if [[ "$OSTYPE" == "linux-gnu" ]]; then
execute ./configure --prefix=${WORKSPACE} --enable-static --enable-pic CXXFLAGS="-fPIC"
else
execute ./configure --prefix=${WORKSPACE} --enable-static --enable-pic
fi
execute make -j $MJOBS
execute make install
execute make install-lib-static
build_done "x264"
fi
if build "libogg"; then
download "http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz" "libogg-1.3.3.tar.gz"
cd $PACKAGES/libogg-1.3.3 || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
build_done "libogg"
fi
if build "libvorbis"; then
download "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz" "libvorbis-1.3.6.tar.gz"
cd $PACKAGES/libvorbis-1.3.6 || exit
execute ./configure --prefix=${WORKSPACE} --with-ogg-libraries=${WORKSPACE}/lib --with-ogg-includes=${WORKSPACE}/include/ --enable-static --disable-shared --disable-oggtest
execute make -j $MJOBS
execute make install
build_done "libvorbis"
fi
if build "libtheora"; then
download "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz" "libtheora-1.1.1.tar.bz"
cd $PACKAGES/libtheora-1.1.1 || exit
sed "s/-fforce-addr//g" configure > configure.patched
chmod +x configure.patched
mv configure.patched configure
execute ./configure --prefix=${WORKSPACE} --with-ogg-libraries=${WORKSPACE}/lib --with-ogg-includes=${WORKSPACE}/include/ --with-vorbis-libraries=${WORKSPACE}/lib --with-vorbis-includes=${WORKSPACE}/include/ --enable-static --disable-shared --disable-oggtest --disable-vorbistest --disable-examples --disable-asm
execute make -j $MJOBS
execute make install
build_done "libtheora"
fi
if build "pkg-config"; then
download "http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" "pkg-config-0.29.2.tar.gz"
cd $PACKAGES/pkg-config-0.29.2 || exit
execute ./configure --silent --prefix=${WORKSPACE} --with-pc-path=${WORKSPACE}/lib/pkgconfig --with-internal-glib
execute make -j $MJOBS
execute make install
build_done "pkg-config"
fi
if build "cmake"; then
download "https://cmake.org/files/v3.11/cmake-3.11.3.tar.gz" "cmake-3.11.3.tar.gz"
cd $PACKAGES/cmake-3.11.3 || exit
rm Modules/FindJava.cmake
perl -p -i -e "s/get_filename_component.JNIPATH/#get_filename_component(JNIPATH/g" Tests/CMakeLists.txt
perl -p -i -e "s/get_filename_component.JNIPATH/#get_filename_component(JNIPATH/g" Tests/CMakeLists.txt
execute ./configure --prefix=${WORKSPACE}
execute make -j $MJOBS
execute make install
build_done "cmake"
fi
if build "vid_stab"; then
download "https://codeload.github.com/georgmartius/vid.stab/legacy.tar.gz/release-0.98b" "vid.stab-0.98b-transcode-1.1-binary-x86_64.tgz"
cd $PACKAGES/georgmartius-vid* || exit
perl -p -i -e "s/vidstab SHARED/vidstab STATIC/" CMakeLists.txt
execute cmake -DCMAKE_INSTALL_PREFIX:PATH=${WORKSPACE} .
execute make install
build_done "vid_stab"
fi
if build "x265"; then
download "https://bitbucket.org/multicoreware/x265/downloads/x265_3.0.tar.gz" "x265-3.0.tar.gz"
cd $PACKAGES/x265_* || exit
cd source || exit
execute cmake -DCMAKE_INSTALL_PREFIX:PATH=${WORKSPACE} -DENABLE_SHARED:bool=off .
execute make -j $MJOBS
execute make install
sed "s/-lx265/-lx265 -lstdc++/g" "$WORKSPACE/lib/pkgconfig/x265.pc" > "$WORKSPACE/lib/pkgconfig/x265.pc.tmp"
mv "$WORKSPACE/lib/pkgconfig/x265.pc.tmp" "$WORKSPACE/lib/pkgconfig/x265.pc"
build_done "x265"
fi
if build "fdk_aac"; then
download "http://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.6.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencore-amr%2Ffiles%2Ffdk-aac%2F&ts=1457561564&use_mirror=kent" "fdk-aac-0.1.6.tar.gz"
cd $PACKAGES/fdk-aac-0.1.6 || exit
execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static
execute make -j $MJOBS
execute make install
build_done "fdk_aac"
fi
build "ffmpeg"
download "http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2" "ffmpeg-snapshot.tar.bz2"
cd $PACKAGES/ffmpeg-4.1 || exit
./configure $ADDITIONAL_CONFIGURE_OPTIONS \
--pkgconfigdir="$WORKSPACE/lib/pkgconfig" \
--prefix=${WORKSPACE} \
--pkg-config-flags="--static" \
--extra-cflags="-I$WORKSPACE/include" \
--extra-ldflags="-L$WORKSPACE/lib" \
--extra-libs="-lpthread -lm" \
--enable-static \
--disable-debug \
--disable-shared \
--disable-ffplay \
--disable-doc \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--enable-pthreads \
--enable-libvpx \
--enable-libmp3lame \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-libx265 \
--enable-runtime-cpudetect \
--enable-libfdk-aac \
--enable-avfilter \
--enable-libopencore_amrwb \
--enable-libopencore_amrnb \
--enable-filters \
--enable-libvidstab
execute make -j $MJOBS
execute make install
INSTALL_FOLDER="/usr/bin"
if [[ "$OSTYPE" == "darwin"* ]]; then
INSTALL_FOLDER="/usr/local/bin"
fi
echo ""
echo "Building done. The binary can be found here: $WORKSPACE/bin/ffmpeg"
echo ""
if [[ $AUTOINSTALL == "yes" ]]; then
if command_exists "sudo"; then
sudo cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg"
sudo cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe"
echo "Done. ffmpeg is now installed to your system"
fi
elif [[ ! $SKIPINSTALL == "yes" ]]; then
if command_exists "sudo"; then
read -r -p "Install the binary to your $INSTALL_FOLDER folder? [Y/n] " response
case $response in
[yY][eE][sS]|[yY])
sudo cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg"
sudo cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe"
echo "Done. ffmpeg is now installed to your system"
;;
esac
fi
fi
exit 0

View File

@@ -0,0 +1,40 @@
#!/bin/bash
# Helper script to download and run the build-ffmpeg script.
make_dir () {
if [ ! -d $1 ]; then
if ! mkdir $1; then
printf "\n Failed to create dir %s" "$1";
exit 1
fi
fi
}
command_exists() {
if ! [[ -x $(command -v "$1") ]]; then
return 1
fi
return 0
}
TARGET='ffmpeg-build'
if ! command_exists "curl"; then
echo "curl not installed.";
exit 1
fi
echo "ffmpeg-build-script-downloader v0.1"
echo "========================================="
echo ""
echo "First we create the ffmpeg build directory $TARGET"
make_dir $TARGET
cd $TARGET
echo "Now we download and execute the build script"
echo ""
bash build-ffmpeg --build

View File

@@ -0,0 +1,30 @@
#!/bin/bash
apk update
apk upgrade
apk add --no-cache git
apk add build-base gcc wget diffutils perl
apk add curl
git clone https://github.com/mdhiggins/sickbeard_mp4_automator.git /config/scripts/MP4_Automator/tmp
cp -r /config/scripts/MP4_Automator/tmp/* /config/scripts/MP4_Automator
rm -rf /config/scripts/MP4_Automator/tmp
git unstage
apk add --no-cache py-setuptools py-pip python-dev libffi-dev gcc musl-dev openssl-dev
pip install --upgrade PIP
pip install requests
pip install requests[security]
pip install requests-cache
pip install babelfish
pip install "guessit<2"
pip install "subliminal<2"
pip install qtfaststart
# As per https://github.com/mdhiggins/sickbeard_mp4_automator/issues/643
pip uninstall -y stevedore
pip install stevedore==1.19.1
#Remove default NZBGetPostProcess script settings, and replace with our own
rm /config/scripts/MP4_Automator/NZBGetPostProcess.py
cp /config/TEMPLATEPPScript /config/scripts/MP4_Automator/NZBGetPostProcess.py
#Build ffmpeg
cd /config
. /config/ffmpeg-build/web-install.sh
#Set script file permissions
chmod 777 -R /config/scripts

View File

@@ -0,0 +1,93 @@
#!/usr/bin/env python
#
# Title: PGBlitz (Reference Title File)
# Maintainer: Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
#
# Additions: clinton-hall - https://github.com/Prinz23
################################################################################
import os
import sys
# NZBGet Exit Codes
NZBGET_POSTPROCESS_PARCHECK = 92
NZBGET_POSTPROCESS_SUCCESS = 93
NZBGET_POSTPROCESS_ERROR = 94
NZBGET_POSTPROCESS_NONE = 95
def is_sample(filePath, inputName, maxSampleSize, SampleIDs):
# 200 MB in bytes
SIZE_CUTOFF = int(maxSampleSize) * 1024 * 1024
if os.path.getsize(filePath) < SIZE_CUTOFF:
if 'SizeOnly' in SampleIDs:
return True
# Ignore 'sample' in files unless 'sample' in Torrent Name
for ident in SampleIDs:
if ident.lower() in filePath.lower() and not ident.lower() in inputName.lower():
return True
# Return False if none of these were met.
return False
if not os.environ.has_key('NZBOP_SCRIPTDIR'):
print "This script can only be called from NZBGet (11.0 or later)."
sys.exit(0)
if os.environ['NZBOP_VERSION'][0:5] < '11.0':
print "NZBGet Version %s is not supported. Please update NZBGet." % (str(os.environ['NZBOP_VERSION']))
sys.exit(0)
print "Script triggered from NZBGet Version %s." % (str(os.environ['NZBOP_VERSION']))
status = 0
if os.environ.has_key('NZBPP_TOTALSTATUS'):
if not os.environ['NZBPP_TOTALSTATUS'] == 'SUCCESS':
print "Download failed with status %s." % (os.environ['NZBPP_STATUS'])
status = 1
else:
# Check par status
if os.environ['NZBPP_PARSTATUS'] == '1' or os.environ['NZBPP_PARSTATUS'] == '4':
print "Par-repair failed, setting status \"failed\"."
status = 1
# Check unpack status
if os.environ['NZBPP_UNPACKSTATUS'] == '1':
print "Unpack failed, setting status \"failed\"."
status = 1
if os.environ['NZBPP_UNPACKSTATUS'] == '0' and os.environ['NZBPP_PARSTATUS'] == '0':
# Unpack was skipped due to nzb-file properties or due to errors during par-check
if os.environ['NZBPP_HEALTH'] < 1000:
print "Download health is compromised and Par-check/repair disabled or no .par2 files found. Setting status \"failed\"."
print "Please check your Par-check/repair settings for future downloads."
status = 1
else:
print "Par-check/repair disabled or no .par2 files found, and Unpack not required. Health is ok so handle as though download successful."
print "Please check your Par-check/repair settings for future downloads."
# Check if destination directory exists (important for reprocessing of history items)
if not os.path.isdir(os.environ['NZBPP_DIRECTORY']):
print "Nothing to post-process: destination directory", os.environ['NZBPP_DIRECTORY'], "doesn't exist. Setting status \"failed\"."
status = 1
# All checks done, now launching the script.
if status == 1:
sys.exit(NZBGET_POSTPROCESS_NONE)
mediaContainer = os.environ['NZBPO_MEDIAEXTENSIONS'].split(',')
SampleIDs = os.environ['NZBPO_SAMPLEIDS'].split(',')
for dirpath, dirnames, filenames in os.walk(os.environ['NZBPP_DIRECTORY']):
for file in filenames:
filePath = os.path.join(dirpath, file)
fileName, fileExtension = os.path.splitext(file)
if fileExtension in mediaContainer or ".*" in mediaContainer : # If the file is a video file
if is_sample(filePath, os.environ['NZBPP_NZBNAME'], os.environ['NZBPO_MAXSAMPLESIZE'], SampleIDs): # Ignore samples
print "Deleting sample file: ", filePath
try:
os.unlink(filePath)
except:
print "Error: unable to delete file", filePath
sys.exit(NZBGET_POSTPROCESS_ERROR)
sys.exit(NZBGET_POSTPROCESS_SUCCESS)

View File

@@ -0,0 +1,106 @@
#!/usr/bin/env python
#
# Title: PGBlitz (Reference Title File)
# Maintainer: Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
#
# Additions: clinton-hall - https://github.com/Prinz23
################################################################################
import os
import sys
import shutil
# NZBGet Exit Codes
NZBGET_POSTPROCESS_PARCHECK = 92
NZBGET_POSTPROCESS_SUCCESS = 93
NZBGET_POSTPROCESS_ERROR = 94
NZBGET_POSTPROCESS_NONE = 95
if not os.environ.has_key('NZBOP_SCRIPTDIR'):
print "This script can only be called from NZBGet (11.0 or later)."
sys.exit(0)
if os.environ['NZBOP_VERSION'][0:5] < '11.0':
print "[ERROR] NZBGet Version %s is not supported. Please update NZBGet." % (str(os.environ['NZBOP_VERSION']))
sys.exit(0)
print "Script triggered from NZBGet Version %s." % (str(os.environ['NZBOP_VERSION']))
status = 0
if os.environ.has_key('NZBPP_TOTALSTATUS'):
if not os.environ['NZBPP_TOTALSTATUS'] == 'SUCCESS':
print "[ERROR] Download failed with status %s." % (os.environ['NZBPP_STATUS'])
status = 1
else:
# Check par status
if os.environ['NZBPP_PARSTATUS'] == '1' or os.environ['NZBPP_PARSTATUS'] == '4':
print "[ERROR] Par-repair failed, setting status \"failed\"."
status = 1
# Check unpack status
if os.environ['NZBPP_UNPACKSTATUS'] == '1':
print "[ERROR] Unpack failed, setting status \"failed\"."
status = 1
if os.environ['NZBPP_UNPACKSTATUS'] == '0' and os.environ['NZBPP_PARSTATUS'] == '0':
# Unpack was skipped due to nzb-file properties or due to errors during par-check
if os.environ['NZBPP_HEALTH'] < 1000:
print "[ERROR] Download health is compromised and Par-check/repair disabled or no .par2 files found. Setting status \"failed\"."
print "[ERROR] Please check your Par-check/repair settings for future downloads."
status = 1
else:
print "[ERROR] Par-check/repair disabled or no .par2 files found, and Unpack not required. Health is ok so handle as though download successful."
print "[WARNING] Please check your Par-check/repair settings for future downloads."
# Check if destination directory exists (important for reprocessing of history items)
if not os.path.isdir(os.environ['NZBPP_DIRECTORY']):
print "[ERROR] Nothing to post-process: destination directory", os.environ['NZBPP_DIRECTORY'], "doesn't exist. Setting status \"failed\"."
status = 1
# All checks done, now launching the script.
if status == 1:
sys.exit(NZBGET_POSTPROCESS_NONE)
def removeEmptyFolders(path, removeRoot=True):
#Function to remove empty folders
if not os.path.isdir(path):
return
# remove empty subfolders
print "[INFO] Checking for empty folders in:%s" % path
files = os.listdir(path)
if len(files):
for f in files:
fullpath = os.path.join(path, f)
if os.path.isdir(fullpath):
removeEmptyFolders(fullpath)
# if folder empty, delete it
files = os.listdir(path)
if len(files) == 0 and removeRoot:
print "[INFO] Removing empty folder:%s" % path
os.rmdir(path)
directory = os.path.normpath(os.environ['NZBPP_DIRECTORY'])
if os.environ['NZBPO_DESTINATIONDIRECTORY'] and os.path.isdir(os.environ['NZBPO_DESTINATIONDIRECTORY']):
destination = os.environ['NZBPO_DESTINATIONDIRECTORY']
if os.environ['NZBPO_APPENDCATEGORIES'] == 'yes':
destination = os.path.join(destination, os.environ['NZBPP_CATEGORY'])
else:
destination = directory
print "Flattening directory: %s" % (directory)
for dirpath, dirnames, filenames in os.walk(directory):
for fileName in filenames:
outputFile = os.path.join(dirpath, fileName)
if dirpath == directory:
continue
target = os.path.join(destination, fileName)
try:
shutil.move(outputFile, target)
except:
print "[ERROR] Could not flatten %s" % outputFile
removeEmptyFolders(directory) # Cleanup empty directories
sys.exit(NZBGET_POSTPROCESS_SUCCESS)

View File

@@ -0,0 +1,167 @@
#!/usr/bin/env python
#
# Title: PGBlitz (Reference Title File)
# Maintainer: Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
#
# Original Author: clinton-hall
# https://github.com/clinton-hall/GetScripts/blob/master/SafeRename.py
#
# Modified By: desimaniac (No Acknowledgement of Source Above)
################################################################################
import os
import re
import shutil
import sys
# NZBGet Exit Codes
NZBGET_POSTPROCESS_PARCHECK = 92
NZBGET_POSTPROCESS_SUCCESS = 93
NZBGET_POSTPROCESS_ERROR = 94
NZBGET_POSTPROCESS_NONE = 95
############################################################
# EXTENSION STUFF
############################################################
def do_check():
if not os.environ.has_key('NZBOP_SCRIPTDIR'):
print "This script can only be called from NZBGet (11.0 or later)."
sys.exit(0)
if os.environ['NZBOP_VERSION'][0:5] < '11.0':
print "[ERROR] NZBGet Version %s is not supported. Please update NZBGet." % (str(os.environ['NZBOP_VERSION']))
sys.exit(0)
print "Script triggered from NZBGet Version %s." % (str(os.environ['NZBOP_VERSION']))
status = 0
if 'NZBPP_TOTALSTATUS' in os.environ:
if not os.environ['NZBPP_TOTALSTATUS'] == 'SUCCESS':
print "[ERROR] Download failed with status %s." % (os.environ['NZBPP_STATUS'])
status = 1
else:
# Check par status
if os.environ['NZBPP_PARSTATUS'] == '1' or os.environ['NZBPP_PARSTATUS'] == '4':
print "[ERROR] Par-repair failed, setting status \"failed\"."
status = 1
# Check unpack status
if os.environ['NZBPP_UNPACKSTATUS'] == '1':
print "[ERROR] Unpack failed, setting status \"failed\"."
status = 1
if os.environ['NZBPP_UNPACKSTATUS'] == '0' and os.environ['NZBPP_PARSTATUS'] == '0':
# Unpack was skipped due to nzb-file properties or due to errors during par-check
if os.environ['NZBPP_HEALTH'] < 1000:
print "[ERROR] Download health is compromised and Par-check/repair disabled or no .par2 files found. " \
"Setting status \"failed\"."
print "[ERROR] Please check your Par-check/repair settings for future downloads."
status = 1
else:
print "[ERROR] Par-check/repair disabled or no .par2 files found, and Unpack not required. Health is " \
"ok so handle as though download successful."
print "[WARNING] Please check your Par-check/repair settings for future downloads."
# Check if destination directory exists (important for reprocessing of history items)
if not os.path.isdir(os.environ['NZBPP_DIRECTORY']):
print "[ERROR] Nothing to post-process: destination directory", os.environ[
'NZBPP_DIRECTORY'], "doesn't exist. Setting status \"failed\"."
status = 1
# All checks done, now launching the script.
if status == 1:
sys.exit(NZBGET_POSTPROCESS_NONE)
def get_file_name(path):
try:
file_name = os.path.basename(path)
extensions = re.findall(r'\.([^.]+)', file_name)
ext = '.'.join(extensions)
name = file_name.replace(".%s" % ext, '')
return name, ext
except Exception:
pass
return None
def is_file_hash(file_name):
hash_regexp = [
r'^[a-fA-F0-9]{40}$',
r'^[a-fA-F0-9]{32}$',
r'^[a-f0-9]{128}$',
r'^[a-zA-Z0-9]{42}$'
]
for hash in hash_regexp:
if re.match(hash, file_name):
return True
return False
def find_files(folder, extension=None, depth=None):
file_list = []
start_count = folder.count(os.sep)
for path, subdirs, files in os.walk(folder, topdown=True):
for name in files:
if depth and path.count(os.sep) - start_count >= depth:
del subdirs[:]
continue
file = os.path.join(path, name)
if not extension:
file_list.append(file)
else:
if file.lower().endswith(extension.lower()):
file_list.append(file)
return sorted(file_list, key=lambda x: x.count(os.path.sep), reverse=True)
############################################################
# MAIN
############################################################
# do checks
do_check()
# retrieve required variables
directory = os.path.normpath(os.environ['NZBPP_DIRECTORY'])
nzb_name = os.environ['NZBPP_NZBFILENAME']
if nzb_name is None:
print("[ERROR] Unable to retrieve NZBPP_NZBFILENAME")
sys.exit(NZBGET_POSTPROCESS_ERROR)
nzb_name = nzb_name.replace('.nzb', '')
print("[INFO] Using \"%s\" for hashed filenames" % nzb_name)
print("[INFO] Scanning \"%s\" for hashed filenames" % directory)
# scan for files
found_files = find_files(directory)
if not found_files:
print("[INFO] No files were found in \"%s\"" % directory)
sys.exit(NZBGET_POSTPROCESS_NONE)
else:
print("[INFO] Found %d files to check for hashed filenames" % len(found_files))
# loop files checking for file hash
moved_files = 0
for found_file_path in found_files:
# set variable
dir_name = os.path.dirname(found_file_path)
file_name, file_ext = get_file_name(found_file_path)
# is this a file hash
if is_file_hash(file_name):
new_file_path = os.path.join(dir_name, "%s.%s" % (nzb_name, file_ext))
print("[INFO] Moving \"%s\" to \"%s\"" % (found_file_path, new_file_path))
try:
shutil.move(found_file_path, new_file_path)
moved_files += 1
except Exception:
print("[ERROR] Failed moving \"%s\" to \"%s\"" % (found_file_path, new_file_path))
print("[INFO] Finished processing \"%s\", moved %d files" % (directory, moved_files))
sys.exit(NZBGET_POSTPROCESS_SUCCESS)

View File

@@ -0,0 +1 @@

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,293 @@
#!/usr/bin/env python
#
# Title: PGBlitz (Reference Title File)
# Maintainer: Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
#
# Additions: clinton-hall - https://github.com/Prinz23
################################################################################
import os
import sys
import re
import locale
reverse_list = [r"\.\d{2}e\d{2}s\.", r"\.p0612\.", r"\.[pi]0801\.", r"\.p027\.", r"\.[pi]675\.", r"\.[pi]084\.", r"\.p063\.", r"\b[45]62[xh]\.", r"\.yarulb\.", r"\.vtd[hp]\.",
r'\.(?:ld[.-]?)?bew\.', r"\.pir.?(shv|dov|bew|dvd|db|rb)\.", r"\brdvd\.", r"\.vts\.", r"\.reneercs\.", r"\.dcv\.", r"\b(pir|mac)dh\b", r"\.reporp\.", r"\.kcaper\.",
r"\.lanretni\.", r"\b3ca\b", r"\bcaa\b", r"\b3pm\b", r"\.cstn\.", r"\.5r\.", r"\brcs\b"]
reverse_pattern = re.compile('|'.join(reverse_list), flags=re.IGNORECASE)
season_pattern = re.compile(r"(.*\.\d{2}e\d{2}s\.)(.*)", flags=re.IGNORECASE)
word_pattern = re.compile(r"([^A-Z0-9]*[A-Z0-9]+)")
char_replace = [[r"(\w)1\.(\w)",r"\1i\2"]
]
garbage_name = re.compile(r"^[a-zA-Z0-9]{2,}$")
media_list = [r"\.s\d{2}e\d{2}\.", r"\.2160p\.", r"\.1080[pi]\.", r"\.720p\.", r"\.576[pi]\.", r"\.480[pi]\.", r"\.360p\.", r"\.[xh]26[45]\b", r"\.bluray\.", r"\.[hp]dtv\.",
r'\.web(?:[.-]?dl)?\.', r"\.(vhs|vod|dvd|web|bd|br).?rip\.", r"\.dvdr\b", r"\.stv\.", r"\.screener\.", r"\.vcd\.", r"\bhd(cam|rip)\b", r"\.proper\.", r"\.repack\.",
r"\.internal\.", r"\bac3\b", r"\baac\b", r"\bmp3\b", r"\.ntsc\.", r"\.pal\.", r"\.secam\.", r"\bdivx\b", r"\bxvid\b", r"\.r5\.", r"\.scr\."]
media_pattern = re.compile('|'.join(media_list), flags=re.IGNORECASE)
media_extentions = [".mkv", ".mp4", ".avi", ".wmv", ".divx", ".xvid"]
if 'nt' == os.name:
import ctypes
class WinEnv:
def __init__(self):
pass
@staticmethod
def get_environment_variable(name):
name = unicode(name) # ensures string argument is unicode
n = ctypes.windll.kernel32.GetEnvironmentVariableW(name, None, 0)
env_value = None
if n:
buf = ctypes.create_unicode_buffer(u'\0'*n)
ctypes.windll.kernel32.GetEnvironmentVariableW(name, buf, n)
env_value = buf.value
return env_value
def __getitem__(self, key):
return self.get_environment_variable(key)
def get(self, key, default=None):
r = self.get_environment_variable(key)
return r if r is not None else default
evn = WinEnv()
else:
class LinuxEnv(object):
def __init__(self, environ):
self.environ = environ
def __getitem__(self, key):
v = self.environ.get(key)
try:
return v.decode(SYS_ENCODING) if isinstance(v, str) else v
except (UnicodeDecodeError, UnicodeEncodeError):
return v
def get(self, key, default=None):
v = self[key]
return v if v is not None else default
evn = LinuxEnv(os.environ)
SYS_ENCODING = None
try:
locale.setlocale(locale.LC_ALL, '')
except (locale.Error, IOError):
pass
try:
SYS_ENCODING = locale.getpreferredencoding()
except (locale.Error, IOError):
pass
if not SYS_ENCODING or SYS_ENCODING in ('ANSI_X3.4-1968', 'US-ASCII', 'ASCII'):
SYS_ENCODING = 'UTF-8'
class ek:
def __init__(self):
pass
@staticmethod
def fix_string_encoding(x):
if str == type(x):
try:
return x.decode(SYS_ENCODING)
except UnicodeDecodeError:
return None
elif unicode == type(x):
return x
return None
@staticmethod
def fix_out_encoding(x):
if isinstance(x, basestring):
return ek.fix_string_encoding(x)
return x
@staticmethod
def fix_list_encoding(x):
if type(x) not in (list, tuple):
return x
return filter(lambda i: None is not i, map(ek.fix_out_encoding, x))
@staticmethod
def encode_item(x):
try:
return x.encode(SYS_ENCODING)
except UnicodeEncodeError:
return x.encode(SYS_ENCODING, 'ignore')
@staticmethod
def win_encode_unicode(x):
if isinstance(x, str):
try:
return x.decode('UTF-8')
except UnicodeDecodeError:
return x
return x
@staticmethod
def ek(func, *args, **kwargs):
if 'nt' == os.name:
# convert all str parameter values to unicode
args = tuple([x if not isinstance(x, str) else ek.win_encode_unicode(x) for x in args])
kwargs = {k: x if not isinstance(x, str) else ek.win_encode_unicode(x) for k, x in
kwargs.iteritems()}
func_result = func(*args, **kwargs)
else:
func_result = func(*[ek.encode_item(x) if type(x) == str else x for x in args], **kwargs)
if type(func_result) in (list, tuple):
return ek.fix_list_encoding(func_result)
elif str == type(func_result):
return ek.fix_string_encoding(func_result)
return func_result
class logger:
INFO = 'INFO'
DETAIL = 'DETAIL'
ERROR = 'ERROR'
WARNING = 'WARNING'
@staticmethod
def log(message, msg_type=INFO):
print('[%s] %s' % (msg_type, message))
def tryInt(s, s_default=0):
try:
return int(s)
except:
return s_default
# NZBGet V11+
# Check if the script is called from nzbget 11.0 or later
nzbget_version = evn.get('NZBOP_VERSION', '0.1')
nzbget_version = tryInt(nzbget_version[:nzbget_version.find(".")])
if nzbget_version >= 11:
logger.log("Script triggered from NZBGet (11.0 or later).")
# NZBGet argv: all passed as environment variables.
clientAgent = "nzbget"
# Exit codes used by NZBGet
POSTPROCESS_PARCHECK=92
POSTPROCESS_SUCCESS=93
POSTPROCESS_ERROR=94
POSTPROCESS_NONE=95
# Check nzbget.conf options
status = 0
if evn['NZBOP_UNPACK'] != 'yes':
logger.log("Please enable option \"Unpack\" in nzbget configuration file, exiting")
sys.exit(POSTPROCESS_NONE)
parstatus = evn['NZBPP_PARSTATUS']
# Check par status
if parstatus == '3':
logger.log("Par-check successful, but Par-repair disabled, exiting")
sys.exit(POSTPROCESS_NONE)
if parstatus == '1':
logger.log("Par-check failed, setting status \"failed\"")
status = 1
sys.exit(POSTPROCESS_NONE)
unpackstatus = evn['NZBPP_UNPACKSTATUS']
# Check unpack status
if unpackstatus == '1':
logger.log("Unpack failed, setting status \"failed\"")
status = 1
sys.exit(POSTPROCESS_NONE)
directory = evn['NZBPP_DIRECTORY']
if unpackstatus == '0' and parstatus != '2':
# Unpack is disabled or was skipped due to nzb-file properties or due to errors during par-check
for dirpath, dirnames, filenames in ek.ek(os.walk, directory):
for file in filenames:
fileExtension = ek.ek(os.path.splitext, file)[1]
if fileExtension in ['.par2']:
logger.log("Post-Process: Unpack skipped and par-check skipped (although par2-files exist), setting status \"failed\"g")
status = 1
break
if ek.ek(os.path.isfile, ek.ek(os.path.join, directory, "_brokenlog.txt")) and not status == 1:
logger.log("Post-Process: _brokenlog.txt exists, download is probably damaged, exiting")
status = 1
if not status == 1:
logger.log("Neither par2-files found, _brokenlog.txt doesn't exist, considering download successful")
# Check if destination directory exists (important for reprocessing of history items)
if not ek.ek(os.path.isdir, directory):
logger.log("Post-Process: Nothing to post-process: destination directory %s doesn't exist" % directory)
status = 1
# All checks done, now launching the script.
rd = False
videos = 0
old_name = None
new_name = None
base_name = ek.ek(os.path.basename, directory)
for dirpath, dirnames, filenames in ek.ek(os.walk, directory):
for file in filenames:
filePath = ek.ek(os.path.join, dirpath, file)
fileName, fileExtension = ek.ek(os.path.splitext, file)
dirname = ek.ek(os.path.dirname, filePath)
if reverse_pattern.search(fileName) is not None:
na_parts = season_pattern.search(fileName)
if na_parts is not None:
word_p = word_pattern.findall(na_parts.group(2))
new_words = ""
for wp in word_p:
if wp[0] == ".":
new_words += "."
new_words += re.sub(r"\W","",wp)
for cr in char_replace:
new_words = re.sub(cr[0],cr[1],new_words)
new_filename = new_words[::-1] + na_parts.group(1)[::-1]
else:
new_filename = fileName[::-1]
logger.log("reversing filename from: %s to %s" % (fileName, new_filename))
try:
ek.ek(os.rename, filePath, ek.ek(os.path.join, dirpath, new_filename + fileExtension))
rd = True
except Exception,e:
logger.log(e, logger.ERROR)
logger.log("Error: unable to rename file %s" % file, logger.ERROR)
pass
elif (fileExtension.lower() in media_extentions) and (garbage_name.search(fileName) is not None) and (media_pattern.search(base_name) is not None):
videos += 1
old_name = filePath
new_name = ek.ek(os.path.join, dirname, '%s%s' % (base_name, fileExtension))
if not rd and videos == 1 and old_name is not None and new_name is not None:
logger.log("renaming the File %s to the Dirname %s" % (ek.ek(os.path.basename, old_name), base_name))
try:
ek.ek(os.rename, old_name, new_name)
rd = True
except Exception,e:
logger.log(e, logger.ERROR)
logger.log("Error unable to rename file %s" % old_name, logger.ERROR)
pass
if rd:
sys.exit(POSTPROCESS_SUCCESS)
else:
sys.exit(POSTPROCESS_NONE)
else:
logger.log("This script can only be called from NZBGet (11.0 or later).", logger.ERROR)
sys.exit(0)

View File

@@ -0,0 +1,294 @@
#!/usr/bin/env python
#
##############################################################################
### NZBGET SCAN SCRIPT ###
# Unzips zipped nzbs.
#
# NOTE: This script requires Python to be installed on your system.
##############################################################################
### OPTIONS ###
### NZBGET SCAN SCRIPT ###
##############################################################################
import os, zipfile, tarfile, gzip, pickle, datetime, re, struct, locale
import rarfile.rarfile as rarfile
from gzip import FEXTRA, FNAME
if 'nt' == os.name:
import ctypes
class WinEnv:
def __init__(self):
pass
@staticmethod
def get_environment_variable(name):
name = unicode(name) # ensures string argument is unicode
n = ctypes.windll.kernel32.GetEnvironmentVariableW(name, None, 0)
result = None
if n:
buf = ctypes.create_unicode_buffer(u'\0'*n)
ctypes.windll.kernel32.GetEnvironmentVariableW(name, buf, n)
result = buf.value
return result
def __getitem__(self, key):
return self.get_environment_variable(key)
def get(self, key, default=None):
r = self.get_environment_variable(key)
return r if r is not None else default
env_var = WinEnv()
else:
class LinuxEnv(object):
def __init__(self, environ):
self.environ = environ
def __getitem__(self, key):
v = self.environ.get(key)
try:
return v.decode(SYS_ENCODING) if isinstance(v, str) else v
except (UnicodeDecodeError, UnicodeEncodeError):
return v
def get(self, key, default=None):
v = self[key]
return v if v is not None else default
env_var = LinuxEnv(os.environ)
SYS_ENCODING = None
try:
locale.setlocale(locale.LC_ALL, '')
except (locale.Error, IOError):
pass
try:
SYS_ENCODING = locale.getpreferredencoding()
except (locale.Error, IOError):
pass
if not SYS_ENCODING or SYS_ENCODING in ('ANSI_X3.4-1968', 'US-ASCII', 'ASCII'):
SYS_ENCODING = 'UTF-8'
filename = env_var.get('NZBNP_FILENAME')
if re.search(r"\.tar\.gz$", filename, flags=re.I) is None:
ext = os.path.splitext(filename)[1].lower()
else:
ext = '.tar.gz'
cat = env_var.get('NZBNP_CATEGORY')
dir = env_var.get('NZBNP_DIRECTORY')
prio = env_var.get('NZBNP_PRIORITY')
top = env_var.get('NZBNP_TOP')
pause = env_var.get('NZBNP_PAUSED')
if 'NZBNP_DUPEKEY' in os.environ:
dupekey = env_var.get('NZBNP_DUPEKEY')
dupescore = env_var.get('NZBNP_DUPESCORE')
dupemode = env_var.get('NZBNP_DUPEMODE')
else:
dupekey = None
dupescore = None
dupemode = None
tmp_zipinfo = os.path.join(os.environ.get('NZBOP_TEMPDIR'), r'nzbget\unzip_scan\info')
nzb_list = []
def read_gzip_info(gzipfile):
gf = gzipfile.fileobj
pos = gf.tell()
# Read archive size
gf.seek(-4, 2)
size = struct.unpack('<I', gf.read())[0]
gf.seek(0)
magic = gf.read(2)
if magic != '\037\213':
raise IOError, 'Not a gzipped file'
method, flag, mtime = struct.unpack("<BBIxx", gf.read(8))
if not flag & FNAME:
# Not stored in the header, use the filename sans .gz
gf.seek(pos)
fname = gzipfile.name
if fname.endswith('.gz'):
fname = fname[:-3]
return fname, size
if flag & FEXTRA:
# Read & discard the extra field, if present
gf.read(struct.unpack("<H", gf.read(2)))
# Read a null-terminated string containing the filename
fname = []
while True:
s = gf.read(1)
if not s or s=='\000':
break
fname.append(s)
gf.seek(pos)
return ''.join(fname), size
def save_obj(obj, name):
tp = os.path.dirname(name)
if not os.path.exists(tp):
try:
os.makedirs(tp)
except:
print "Error creating Dir " + tp
return
try:
with open(name, 'wb') as f:
pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
except:
print "Error saving: " + name
def load_obj(name):
if os.path.isfile(name):
try:
with open(name, 'rb') as f:
return pickle.load(f)
except:
print "Error loading " + name
return None
else:
return None
def save_nzb_list():
if nzb_list:
save_obj(nzb_list, tmp_zipinfo)
else:
if os.path.isfile(tmp_zipinfo):
try:
os.unlink(tmp_zipinfo)
except:
print "Error deleting " + tmp_zipinfo
def load_nzb_list():
global nzb_list
nzb_list = load_obj(tmp_zipinfo)
if nzb_list:
now = datetime.datetime.now()
o_l = len(nzb_list)
nzb_list[:] = [el for el in nzb_list if (now - el[8]).days < 1]
if nzb_list is not None and o_l != len(nzb_list):
save_nzb_list()
def get_files(zf):
zi = zf.infolist()
zi[:] = [el for el in zi if os.path.splitext(el.filename)[1].lower() == '.nzb']
return zi
def get_tar_files(tf):
ti = tf.getmembers()
ti[:] = [el for el in ti if el.isfile() and os.path.splitext(el.name)[1].lower() == '.nzb']
return ti
def get_rar_files(rf):
ri = rf.infolist()
ri[:] = [el for el in ri if os.path.splitext(el.filename)[1].lower() == '.nzb']
return ri
def remove_filename():
try:
os.unlink(filename)
except:
print "Error deleting " + filename
if ext == '.zip':
load_nzb_list()
zipf = zipfile.ZipFile(filename, mode='r')
zf = get_files(zipf)
if zf:
zipf.extractall(path = dir, members = zf)
now = datetime.datetime.now()
for z in zf:
if nzb_list:
nzb_list.append([z.filename, cat, prio, top, pause, dupekey, dupescore, dupemode, now])
else:
nzb_list = [[z.filename, cat, prio, top, pause, dupekey, dupescore, dupemode, now]]
save_nzb_list()
zipf.close()
remove_filename()
elif ext in ['.tar.gz', '.tar', '.tgz']:
load_nzb_list()
tarf = tarfile.open(filename, mode='r')
tf = get_tar_files(tarf)
if tf:
tarf.extractall(path = dir, members = tf)
now = datetime.datetime.now()
for z in tf:
if nzb_list:
nzb_list.append([z.name, cat, prio, top, pause, dupekey, dupescore, dupemode, now])
else:
nzb_list = [[z.name, cat, prio, top, pause, dupekey, dupescore, dupemode, now]]
save_nzb_list()
tarf.close()
remove_filename()
elif ext == '.gz':
load_nzb_list()
gzf =gzip.open(filename, mode='rb')
out_filename, size = read_gzip_info(gzf)
if out_filename and os.path.splitext(out_filename)[1].lower() == '.nzb':
with open(os.path.join(os.path.dirname(filename), out_filename), 'wb') as outf:
outf.write(gzf.read())
outf.close()
if gzf and out_filename:
now = datetime.datetime.now()
if nzb_list:
nzb_list.append([os.path.basename(out_filename), cat, prio, top, pause, dupekey, dupescore, dupemode, now])
else:
nzb_list = [[os.path.basename(out_filename), cat, prio, top, pause, dupekey, dupescore, dupemode, now]]
save_nzb_list()
gzf.close()
remove_filename()
elif ext == '.rar':
load_nzb_list()
rarf = rarfile.RarFile(filename, mode='r')
rf = get_files(rarf)
if rf:
rarf.extractall(path = dir, members = rf)
now = datetime.datetime.now()
for r in rf:
if nzb_list:
nzb_list.append([r.filename, cat, prio, top, pause, dupekey, dupescore, dupemode, now])
else:
nzb_list = [[r.filename, cat, prio, top, pause, dupekey, dupescore, dupemode, now]]
save_nzb_list()
rarf.close()
remove_filename()
elif ext == '.nzb' and os.path.exists(tmp_zipinfo):
load_nzb_list()
if nzb_list:
ni = None
f_l = os.path.basename(filename).lower()
for i, nf in enumerate(nzb_list):
if os.path.basename(nf[0]).lower() == f_l:
ni = i
break
if ni is not None:
print "[NZB] CATEGORY=" + str(nzb_list[ni][1])
print "[NZB] PRIORITY=" + str(nzb_list[ni][2])
print "[NZB] TOP=" + str(nzb_list[ni][3])
print "[NZB] PAUSED=" + str(nzb_list[ni][4])
if dupekey is not None:
print "[NZB] DUPEKEY=" + str(nzb_list[ni][5])
print "[NZB] DUPESCORE=" + str(nzb_list[ni][6])
print "[NZB] DUPEMODE=" + str(nzb_list[ni][7])
del nzb_list[ni]
save_nzb_list()

View File

@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
umask 000
exec \
s6-envuidgid -nB 1000:1000 /app/nzbget/nzbget -s -c /config/nzbget.conf \
-o OutputMode=log

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

66
apps/traktor.yml Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/bash
#
# Title: Traktor docker container - track you Plex TV-Show progress
# Author(s): h1f0x
# URL: https://github.com/h1f0x/docker-trackt-plex-tracker
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'traktor'
intport: '80'
extport: '5892'
image: 'h1f0x/docker-traktor'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- '/opt/appdata/plex/database/Library/Application Support/Plex Media Server/Plug-in Support/Databases:/plex:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
UID: '1000'
GID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
privileged: yes
state: started
labels: '{{pg_labels}}'

150
apps/transmission-vpn.yml Normal file
View File

@@ -0,0 +1,150 @@
#!/bin/bash
#
# Title: Transmissionbt (with OpenVPN, WebProxy, RSS)
# Author(s): Eric Petit, Josh Elsasser, Bryan Varner, Charles Kerr, Kristian Haugene, nning
# URL: https://transmissionbt.com/ - https://github.com/haugene/docker-transmission-openvpn
# GNU: General Public License v2.0, v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'transmission-vpn'
pgrole2: 'transmission-rss'
intport: '9091'
extport: '9091'
intport2: '8888'
extport2: '8888'
image: 'haugene/transmission-openvpn:latest'
image2: 'haugene/transmission-rss:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: Checking for existing rss folder
stat:
path: "/opt/appdata/{{pgrole}}/rss"
register: rsscheck
- name: Checking for existing rss config
stat:
path: "/opt/appdata/{{pgrole}}/rss/transmission-rss.conf"
register: cfgcheck
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/etc/localtime:/etc/localtime:ro'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/opt/appdata/{{pgrole}}:/config'
- name: 'Setting {{pgrole2}} Volumes'
set_fact:
pg_volumes2:
- '/opt/appdata/{{pgrole}}/rss/transmission-rss.conf:/etc/transmission-rss.conf:ro'
- name: 'Setting {{pgrole}} ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
OPENVPN_PROVIDER: 'see available configs at https://git.io/fpCSF'
OPENVPN_CONFIG: 'default'
OPENVPN_USERNAME: 'vpnuser'
OPENVPN_PASSWORD: 'vpnpass'
OPENVPN_OPTS: '--inactive 3600 --ping 10 --ping-exit 60'
CREATE_TUN_DEVICE: 'true'
WEBPROXY_ENABLED: 'true'
WEBPROXY_PORT: '{{extport2}}'
LOCAL_NETWORK: 192.168.0.0/24
TRANSMISSION_WEB_HOME: '/config/webui-theme'
TRANSMISSION_WEB_UI: 'transmission-web-control'
TRANSMISSION_BLOCKLIST_ENABLED: 'true'
TRANSMISSION_BLOCKLIST_URL: 'http://john.bitsurge.net/public/biglist.p2p.gz'
TRANSMISSION_DHT_ENABLED: 'false'
TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}'
TRANSMISSION_INCOMPLETE_DIR: '/mnt/incomplete/{{pgrole}}'
TRANSMISSION_RPC_PORT: '{{intport}}'
TRANSMISSION_WATCH_DIR: '/config/watch'
TRANSMISSION_WATCH_DIR_ENABLED: 'false'
TRANSMISSION_HOME: '/config/home'
- name: 'Setting {{pgrole2}} ENV'
set_fact:
pg_env2:
TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}'
RSS_URL: 'hxxp://unused'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
devices:
- '/dev/net/tun:/dev/net/tun:rwm'
dns_servers:
- 1.1.1.1
- 84.200.69.80
- 45.33.97.5
- 208.67.222.222
capabilities:
- NET_ADMIN
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'
- name: 'RSS feed configuration - Folder'
block:
- name: 'Creating RSS folder'
shell: "mkdir /opt/appdata/{{pgrole}}/rss"
when: not rsscheck.stat.exists
- name: 'RSS feed configuration - Config'
block:
- name: 'Creating configuration file'
shell: "touch /opt/appdata/{{pgrole}}/rss/transmission-rss.conf && chown -R 1000:1000 /opt/appdata/{{pgrole}}/rss/ && echo see https://git.io/fhAm2 to configure > /opt/appdata/{{pgrole}}/rss/transmission-rss.conf"
when: not cfgcheck.stat.exists
- name: 'Deploying {{pgrole2}}'
docker_container:
name: '{{pgrole2}}'
image: '{{image2}}'
pull: yes
volumes: '{{pg_volumes2}}'
env: '{{pg_env2}}'
links:
- '{{pgrole}}:transmission'
restart_policy: unless-stopped
state: started
- name: 'Wait for {{pgrole}} to initialize'
wait_for: timeout=30
- name: 'Stopping {{pgrole}}. Go configure ENV values.'
docker_container:
name: '{{pgrole}}'
state: stopped

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

View File

@@ -18,14 +18,14 @@
intport2: '10001/udp'
extport2: '10001'
intport3: '8080/tcp'
extport3: '8080'
extport3: '8088'
intport4: '8081/tcp'
extport4: '8081'
intport5: '8443/tcp'
extport5: '8443'
intport6: '8880/tcp'
extport6: '8880'
image: 'linuxserver/unifi:latest'
image: 'linuxserver/unifi-controller:latest'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
@@ -63,7 +63,6 @@
pg_env:
PUID: '1000'
PGID: '1000'
TZ: '${TZ}'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
@@ -72,12 +71,12 @@
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
- '{{ports.stdout}}{{extport2}}:{{intport2}}'
- '{{ports.stdout}}{{extport3}}:{{intport3}}'
- '{{ports.stdout}}{{extport4}}:{{intport4}}'
- '{{ports.stdout}}{{extport5}}:{{intport5}}'
- '{{ports.stdout}}{{extport6}}:{{intport6}}'
- '{{extport}}:{{intport}}'
- '{{extport2}}:{{intport2}}'
- '{{extport3}}:{{intport3}}'
- '{{extport4}}:{{intport4}}'
- '{{extport5}}:{{intport5}}'
- '{{extport6}}:{{intport6}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: always

66
apps/varken.yml Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/bash
#
# Title: CentOS 7 Varken
# Author(s): h1f0x
# URL: https://github.com/h1f0x/centos-varken
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'varken'
intport: '80'
extport: '5985'
image: 'h1f0x/centos-varken'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
- name: 'Including plugins'
include_tasks: '/opt/communityapps/apps/_plugins.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
UID: '1000'
GID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
privileged: yes
state: started
labels: '{{pg_labels}}'

64
apps/vnc-xfce.yml Normal file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
#
# Title: PGBlitz (consol/ubuntu-xfce-vnc)
# Author(s): MrDoob
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# FACTS #######################################################################
- name: 'Set Known Facts'
set_fact:
pgrole: 'vnc-xfce'
intport: '6901'
extport: '6910'
image: 'consol/ubuntu-xfce-vnc'
# CORE (MANDATORY) ############################################################
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# LABELS ######################################################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt/unionfs:/unionfs:rw'
- '/mnt:/mnt:rw'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN DEPLOYMENT #############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'

View File

@@ -1,8 +1,8 @@
#!/bin/bash
#
# Title: PlexGuide (Reference Title File)
# Title: PGBlitz (Reference Title File)
# Author(s): TechButton
# URL: https://plexguide.com - http://github.plexguide.com
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---

68
apps/zammad.yml Normal file
View File

@@ -0,0 +1,68 @@
#!/bin/bash
#
# Title: PGBlitz (Reference Title File)
# Author(s): Admin9705
# URL: https://pgblitz.com - http://github.pgblitz.com
# GNU: General Public License v3.0
################################################################################
---
- hosts: localhost
gather_facts: false
tasks:
# CORE (MANDATORY) DO NOT CHANGE ###########################################
- name: 'Set Known Facts'
set_fact:
pgrole: "zammad"
intport: "80"
extport: "8777"
image: "zammad/zammad"
- name: 'Including cron job'
include_tasks: '/opt/communityapps/apps/_core.yml'
# EXTRA FUNCTIONS REQUIRED BY THE ROLE #####################################
##### NOTHING REQUIRED
# LABELS #### KEEPS BOTTOM CLEAN ###########################################
- name: 'Adding Traefik'
set_fact:
pg_labels:
traefik.frontend.auth.forward.address: '{{gauth}}'
traefik.enable: 'true'
traefik.port: '{{intport}}'
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
- name: 'Setting PG Volumes'
set_fact:
pg_volumes:
- '/opt/appdata/{{pgrole}}:/config'
- '{{path.stdout}}:{{path.stdout}}'
- '/mnt:/mnt'
- '/etc/localtime:/etc/localtime:ro'
- name: 'Setting PG ENV'
set_fact:
pg_env:
PUID: '1000'
PGID: '1000'
# MAIN SCRIPT ##############################################################
- name: 'Deploying {{pgrole}}'
docker_container:
name: '{{pgrole}}'
image: '{{image}}'
pull: yes
published_ports:
- '{{ports.stdout}}{{extport}}:{{intport}}'
volumes: '{{pg_volumes}}'
env: '{{pg_env}}'
restart_policy: unless-stopped
networks:
- name: plexguide
aliases:
- '{{pgrole}}'
state: started
labels: '{{pg_labels}}'