mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
add sonarr, bazarr, jackett
This commit is contained in:
4
bazaar/CHANGELOG.md
Normal file
4
bazaar/CHANGELOG.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## 3.0.2.4552
|
||||
|
||||
- Update to latest version from linuxserver/docker-bazarr
|
||||
- Enables PUID/GUID options
|
||||
28
bazaar/Dockerfile
Normal file
28
bazaar/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_VERSION
|
||||
ARG BUILD_UPSTREAM="0.9.4"
|
||||
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/bazarr|g" /etc/services.d/bazarr/run \
|
||||
&& sed -i "s|/config|/config/bazarr|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
bazaar/README.md
Normal file
35
bazaar/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Home assistant add-on: bazarr
|
||||
|
||||
![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
|
||||
|
||||
[bazarr](https://github.com/bazarr/bazarr) - A fork of bazarr to work with movies like Couchpotato.
|
||||
|
||||
This addon is based on the [docker image](https://github.com/linuxserver/docker-bazarr) 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
bazaar/apparmor.txt
Normal file
48
bazaar/apparmor.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile bazarr_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
bazaar/build.json
Normal file
8
bazaar/build.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build_from": {
|
||||
"armhf": "linuxserver/bazarr:arm32v7-version-v",
|
||||
"armv7": "linuxserver/bazarr:arm32v7-version-v",
|
||||
"aarch64": "linuxserver/bazarr:arm64v8-version-v",
|
||||
"amd64": "linuxserver/bazarr:amd64-version-v"
|
||||
}
|
||||
}
|
||||
43
bazaar/config.json
Normal file
43
bazaar/config.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "Bazarr NAS",
|
||||
"version": "0.9.4",
|
||||
"upstream": "0.9.4",
|
||||
"slug": "bazarr_nas",
|
||||
"description": "Companion application to Sonarr and Radarr to download subtitles",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"startup": "services",
|
||||
"arch": ["aarch64", "amd64", "armv7", "armhf"],
|
||||
"ports": {
|
||||
"6767/tcp": 6767
|
||||
},
|
||||
"ports_description": {
|
||||
"6767/tcp": "web interface"
|
||||
},
|
||||
"map": ["config:rw", "share:rw", "media:rw", "ssl"],
|
||||
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
|
||||
"full_access": true,
|
||||
"webui": "http://[HOST]:[PORT:6767]",
|
||||
"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
bazaar/icon.png
Normal file
BIN
bazaar/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
bazaar/logo.png
Normal file
BIN
bazaar/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
5
bazaar/root/etc/cont-init.d/00-ha-env
Normal file
5
bazaar/root/etc/cont-init.d/00-ha-env
Normal 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
|
||||
19
bazaar/root/etc/cont-init.d/20-folders
Normal file
19
bazaar/root/etc/cont-init.d/20-folders
Normal 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/bazarr ]; then
|
||||
echo "Creating /config/bazarr"
|
||||
mkdir -p /config/bazarr
|
||||
chown -R abc:abc /config/bazarr
|
||||
fi
|
||||
43
bazaar/root/etc/cont-init.d/50-mounts
Normal file
43
bazaar/root/etc/cont-init.d/50-mounts
Normal 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
|
||||
4
jackett/CHANGELOG.md
Normal file
4
jackett/CHANGELOG.md
Normal 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
28
jackett/Dockerfile
Normal 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
35
jackett/README.md
Normal 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
48
jackett/apparmor.txt
Normal 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
8
jackett/build.json
Normal 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
43
jackett/config.json
Normal 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
BIN
jackett/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
jackett/logo.png
Normal file
BIN
jackett/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
5
jackett/root/etc/cont-init.d/00-ha-env
Normal file
5
jackett/root/etc/cont-init.d/00-ha-env
Normal 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
|
||||
19
jackett/root/etc/cont-init.d/20-folders
Normal file
19
jackett/root/etc/cont-init.d/20-folders
Normal 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
|
||||
43
jackett/root/etc/cont-init.d/50-mounts
Normal file
43
jackett/root/etc/cont-init.d/50-mounts
Normal 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
|
||||
4
sonaar/CHANGELOG.md
Normal file
4
sonaar/CHANGELOG.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## 3.0.2.4552
|
||||
|
||||
- Update to latest version from linuxserver/docker-sonarr
|
||||
- Enables PUID/GUID options
|
||||
28
sonaar/Dockerfile
Normal file
28
sonaar/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_VERSION
|
||||
ARG BUILD_UPSTREAM="3.0.6.1196"
|
||||
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/sonarr|g" /etc/services.d/sonarr/run \
|
||||
&& sed -i "s|/config|/config/sonarr|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
sonaar/README.md
Normal file
35
sonaar/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Home assistant add-on: sonarr
|
||||
|
||||
![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
|
||||
|
||||
[sonarr](https://github.com/sonarr/sonarr) - A fork of Sonarr to work with movies like Couchpotato.
|
||||
|
||||
This addon is based on the [docker image](https://github.com/linuxserver/docker-sonarr) 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
sonaar/apparmor.txt
Normal file
48
sonaar/apparmor.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile sonarr_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
sonaar/build.json
Normal file
8
sonaar/build.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build_from": {
|
||||
"armhf": "linuxserver/sonarr:arm32v7-version-",
|
||||
"armv7": "linuxserver/sonarr:arm32v7-version-",
|
||||
"aarch64": "linuxserver/sonarr:arm64v8-version-",
|
||||
"amd64": "linuxserver/sonarr:amd64-version-"
|
||||
}
|
||||
}
|
||||
43
sonaar/config.json
Normal file
43
sonaar/config.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "Sonarr NAS",
|
||||
"version": "3.0.6.1196",
|
||||
"upstream": "3.0.6.1196",
|
||||
"slug": "sonarr_nas",
|
||||
"description": "Can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. ",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"startup": "services",
|
||||
"arch": ["aarch64", "amd64", "armv7", "armhf"],
|
||||
"ports": {
|
||||
"8989/tcp": 8989
|
||||
},
|
||||
"ports_description": {
|
||||
"8989/tcp": "web interface"
|
||||
},
|
||||
"map": ["config:rw", "share:rw", "media:rw", "ssl"],
|
||||
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
|
||||
"full_access": true,
|
||||
"webui": "http://[HOST]:[PORT:8989]",
|
||||
"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
sonaar/icon.png
Normal file
BIN
sonaar/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
sonaar/logo.png
Normal file
BIN
sonaar/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
5
sonaar/root/etc/cont-init.d/00-ha-env
Normal file
5
sonaar/root/etc/cont-init.d/00-ha-env
Normal 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
|
||||
19
sonaar/root/etc/cont-init.d/20-folders
Normal file
19
sonaar/root/etc/cont-init.d/20-folders
Normal 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/sonarr ]; then
|
||||
echo "Creating /config/sonarr"
|
||||
mkdir -p /config/sonarr
|
||||
chown -R abc:abc /config/sonarr
|
||||
fi
|
||||
43
sonaar/root/etc/cont-init.d/50-mounts
Normal file
43
sonaar/root/etc/cont-init.d/50-mounts
Normal 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
|
||||
Reference in New Issue
Block a user