-
Notifications
You must be signed in to change notification settings - Fork 6
/
jackett
65 lines (57 loc) · 1.85 KB
/
jackett
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
############# https://github.com/plexguide/PlexGuide.com/graphs/contributors ###
jackett () {
container_reset
# VARIABLES ####################################################################
pgrole="jackett"
image="linuxserver/jackett"
port_inside01="9117"
port_outside01="9117"
traefik_extport="9117"
container_path /pg /pg
container_path /pg/data/$pgrole /config/$pgrole
container_path /etc/localtime /etc/localtime:ro
container_permissions UID 1000
container_permissions GID 1000
container_permissions GIDLIST 1000
# IMAGES EXPORT - 1ST IS DEFAULT ###############################################
cat <<- EOF > "/pg/images/$pgrole.images"
linuxserver/jackett:latest
linuxserver/jackett:development
EOF
# YML EXPORT ###################################################################
container_core
cat <<- EOF > "/pg/apps/$pgrole.yml"
$container_header
### ALIGN WITH THE A ################################## START - EXTRAS #########
- name: 'XML Check ~ $pgrole'
stat:
path: '/pg/data/$pgrole/config/system.xml'
register: xmlcheck
####### ALIGN WITH THE A ############################## CORE ###################
$container_start
published_ports:
- '${portcheck_add}${port_outside01}:${port_inside01}'
env:
$container_permissions
labels:
$container_traefik
$container_oddball
$container_ending
### ALIGN WITH THE A ################################## END - EXTRAS ###########
- name: 'Configuring $pgrole for first time use'
block:
- name: 'Wait 5 Seconds'
wait_for:
timeout: 5
- name: 'Stop $pgrole'
docker_container:
name: '$pgrole'
state: stopped
- name: 'Restart $pgrole'
docker_container:
name: '$pgrole'
state: started
when: not xmlcheck.stat.exists
EOF
}