add sonarr, bazarr, jackett

This commit is contained in:
Alexandre
2021-04-25 13:52:00 +02:00
parent f80ba6cf46
commit 80bed391ff
33 changed files with 699 additions and 0 deletions

4
jackett/CHANGELOG.md Normal file
View File

@@ -0,0 +1,4 @@
## 3.0.2.4552
- Update to latest version from linuxserver/docker-jackett
- Enables PUID/GUID options

28
jackett/Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
ARG BUILD_FROM
ARG BUILD_VERSION
ARG BUILD_UPSTREAM="0.17.946"
FROM ${BUILD_FROM}${BUILD_UPSTREAM}
RUN curl -J -L -o /tmp/bashio.tar.gz \
"https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \
&& mkdir /tmp/bashio \
&& tar zxvf \
/tmp/bashio.tar.gz \
--strip 1 -C /tmp/bashio \
\
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -fr /tmp/bashio.tar.gz
# use /data instead of /config for hass.io environment
RUN sed -i "s|/config|/config/jackett|g" /etc/services.d/jackett/run \
&& sed -i "s|/config|/config/jackett|g" /etc/cont-init.d/30-config \
\
# Allow UID and GID setting
&& sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser
# copy local files
COPY root/ /

35
jackett/README.md Normal file
View File

@@ -0,0 +1,35 @@
# Home assistant add-on: jackett
![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
## About
Forked to add latest version, addition of OCR
- Inital version : https://github.com/petersendev/hassio-addons
[jackett](https://github.com/jackett/jackett) - A fork of jackett to work with movies like Couchpotato.
This addon is based on the [docker image](https://github.com/linuxserver/docker-jackett) from linuxserver.io.
## Installation
The installation of this add-on is pretty straightforward and not different in
comparison to installing any other Hass.io add-on.
1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance.
1. Install this add-on.
1. Click the `Save` button to store your configuration.
1. Start the add-on.
1. Check the logs of the add-on to see if everything went well.
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
## Configuration
Webui can be found at `<your-ip>:7878`.
[repository]: https://github.com/petersendev/hassio-addons
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg

48
jackett/apparmor.txt Normal file
View File

@@ -0,0 +1,48 @@
#include <tunables/global>
profile jackett_addon flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
capability,
file,
mount,
umount,
remount,
capability setgid,
capability setuid,
capability sys_admin,
capability dac_read_search,
# capability dac_override,
# capability sys_rawio,
# S6-Overlay
/bin/** ix,
/usr/bin/** ix,
/usr/lib/bashio/** ix,
/etc/s6/** rix,
/run/s6/** rix,
/etc/services.d/** rwix,
/etc/cont-init.d/** rwix,
/etc/cont-finish.d/** rwix,
/init rix,
/var/run/** mrwkl,
/var/run/ mrwkl,
/dev/i2c-1 mrwkl,
# Files required
/dev/sda1 mrwkl,
/dev/sdb1 mrwkl,
/dev/mmcblk0p1 mrwkl,
/dev/* mrwkl,
/tmp/** mrkwl,
# Data access
/data/** rw,
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
ptrace (trace,read) peer=docker-default,
# docker daemon confinement requires explict allow rule for signal
signal (receive) set=(kill,term) peer=/usr/bin/docker,
}

8
jackett/build.json Normal file
View File

@@ -0,0 +1,8 @@
{
"build_from": {
"armhf": "linuxserver/jackett:arm32v7-version-v",
"armv7": "linuxserver/jackett:arm32v7-version-v",
"aarch64": "linuxserver/jackett:arm64v8-version-v",
"amd64": "linuxserver/jackett:amd64-version-v"
}
}

43
jackett/config.json Normal file
View File

@@ -0,0 +1,43 @@
{
"name": "Jackett NAS",
"version": "0.17.946",
"upstream": "0.17.946",
"slug": "jackett_nas",
"description": "translates queries from apps (Sonarr, SickRage, CouchPotato, Mylar, etc) into tracker-site-specific http queries, parses the html response, then sends results back to the requesting software",
"url": "https://github.com/alexbelgium/hassio-addons",
"startup": "services",
"arch": ["aarch64", "amd64", "armv7", "armhf"],
"ports": {
"9117/tcp": 9117
},
"ports_description": {
"9117/tcp": "web interface"
},
"map": ["config:rw", "share:rw", "media:rw", "ssl"],
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
"full_access": true,
"webui": "http://[HOST]:[PORT:9117]",
"boot": "auto",
"environment": {
"PUID": "0",
"PGID": "0"
},
"options": {
"PUID": 0,
"PGID": 0,
"localdisks": ["sda1"],
"networkdisks": "<//SERVER/SHARE>",
"cifsusername": "<username>",
"cifspassword": "<password>"
},
"schema": {
"PUID": "int",
"PGID": "int",
"TZ": "str?",
"localdisks": ["str"],
"networkdisks": "str",
"cifsusername": "str",
"cifspassword": "str"
},
"snapshot_exclude": ["**/Backups/*", "**/logs/*", "**/MediaCover/*"]
}

BIN
jackett/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
jackett/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,5 @@
#!/usr/bin/with-contenv bashio
for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do
printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k
done

View File

@@ -0,0 +1,19 @@
#!/usr/bin/with-contenv bash
if [ ! -d /share/storage/movies ]; then
echo "Creating /share/storage/movies"
mkdir -p /share/storage/movies
chown -R abc:abc /share/storage/movies
fi
if [ ! -d /share/downloads ]; then
echo "Creating /share/downloads"
mkdir -p /share/downloads
chown -R abc:abc /share/downloads
fi
if [ ! -d /config/jackett ]; then
echo "Creating /config/jackett"
mkdir -p /config/jackett
chown -R abc:abc /config/jackett
fi

View File

@@ -0,0 +1,43 @@
#!/usr/bin/with-contenv bashio
bashio::log.info 'Mounting external hdd...'
# Mount local Share if configured and if Protection Mode is active
if bashio::config.has_value 'localdisks'; then
MOREDISKS=$(bashio::config 'localdisks')
bashio::log.info "Local Disks mounting.. ${MOREDISKS}" && \
for disk in $MOREDISKS
do
bashio::log.info "Mount ${disk}"
mkdir -p /share/$disk && \
if [ ! -d /share/$disk ]; then
echo "Creating /share/$disk"
mkdir -p /share/$disk
chown -R abc:abc /share/$disk
fi
mount /dev/$disk /share/$disk && \
bashio::log.info "Success!"
done || \
bashio::log.warning "Protection mode is ON. Unable to mount local drives!"
fi
# Mount CIFS Share if configured and if Protection Mode is active
if bashio::config.has_value 'networkdisks'; then
MOREDISKS=$(bashio::config 'networkdisks')
CIFS_USERNAME=$(bashio::config 'cifsusername')
CIFS_PASSWORD=$(bashio::config 'cifspassword')
bashio::log.info "Network Disks mounting.. ${MOREDISKS}" && \
for disk in $MOREDISKS
do
bashio::log.info "Mount ${disk}"
mkdir -p /share/storagecifs && \
if [ ! -d /storage/storagecifs ]; then
echo "Creating /storage/storagecifs"
mkdir -p /storage/storagecifs
chown -R abc:abc /storage/storagecifs
fi
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \
bashio::log.info "Success!"
done || \
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
fi