mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-22 20:46:28 +01:00
prowlarr addition
This commit is contained in:
1
prowlarr/CHANGELOG.md
Normal file
1
prowlarr/CHANGELOG.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
46
prowlarr/Dockerfile
Normal file
46
prowlarr/Dockerfile
Normal file
@@ -0,0 +1,46 @@
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_VERSION
|
||||
ARG BUILD_UPSTREAM="0.1.0.515"
|
||||
FROM ${BUILD_FROM}${BUILD_UPSTREAM}
|
||||
ARG BASHIO_VERSION=0.13.0
|
||||
|
||||
RUN \
|
||||
################
|
||||
# Install apps #
|
||||
################
|
||||
apt-get update \
|
||||
&& apt-get install -y \
|
||||
jq \
|
||||
curl \
|
||||
cifs-utils \
|
||||
keyutils \
|
||||
\
|
||||
###################
|
||||
# Install bashio #
|
||||
##################
|
||||
&& mkdir -p /tmp/bashio \
|
||||
&& curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \
|
||||
| tar -xzf - --strip 1 -C /tmp/bashio \
|
||||
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||
&& rm -rf /tmp/bashio \
|
||||
\
|
||||
# use /data instead of /config for hass.io environment
|
||||
&& sed -i "s|/config|/config/prowlarr|g" /etc/services.d/prowlarr/run \
|
||||
&& sed -i "s|/config|/config/prowlarr|g" /etc/cont-init.d/30-config \
|
||||
\
|
||||
########################################
|
||||
# Correct upstream image folders links #
|
||||
########################################
|
||||
\
|
||||
# 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 \
|
||||
\
|
||||
# Correct permissions
|
||||
&& sed -i 's|/config|-R /config/prowlarr|g' /etc/cont-init.d/10-adduser \
|
||||
&& sed -i 's= /config=/config/prowlarr || true=g' /etc/cont-init.d/30-config
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
35
prowlarr/README.md
Normal file
35
prowlarr/README.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Home assistant add-on: Radarr
|
||||
![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
|
||||
|
||||
[Radarr](https://github.com/Radarr/Radarr) - A fork of Sonarr to work with movies like Couchpotato.
|
||||
|
||||
This addon is based on the [docker image](https://github.com/linuxserver/docker-radarr) 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/alexbelgium/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
prowlarr/apparmor.txt
Normal file
48
prowlarr/apparmor.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile prowlarr_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
prowlarr/build.json
Normal file
8
prowlarr/build.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"build_from": {
|
||||
"armhf": "linuxserver/prowlarr:arm32v7-nightly-version-",
|
||||
"armv7": "linuxserver/prowlarr:arm32v7-nightly-version-",
|
||||
"aarch64": "linuxserver/prowlarr:arm64v8-nightly-version-",
|
||||
"amd64": "linuxserver/prowlarr:amd64-nightly-version-"
|
||||
}
|
||||
}
|
||||
53
prowlarr/config.json
Normal file
53
prowlarr/config.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "Prowlarr NAS",
|
||||
"version": "0.1.0.515",
|
||||
"upstream": "0.1.0.515",
|
||||
"slug": "prowlarr",
|
||||
"description": "Indexer manager/proxy built on the popular arr .net/reactjs base stack to integrate with your various PVR apps",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"startup": "services",
|
||||
"arch": [
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"armv7",
|
||||
"armhf"
|
||||
],
|
||||
"ports": {
|
||||
"9696/tcp": 9696
|
||||
},
|
||||
"ports_description": {
|
||||
"9696/tcp": "web interface"
|
||||
},
|
||||
"map": [
|
||||
"config:rw",
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl"
|
||||
],
|
||||
"privileged": [
|
||||
"SYS_ADMIN",
|
||||
"DAC_READ_SEARCH"
|
||||
],
|
||||
"webui": "http://[HOST]:[PORT:9696]",
|
||||
"boot": "auto",
|
||||
"environment": {
|
||||
"PUID": "0",
|
||||
"PGID": "0"
|
||||
},
|
||||
"options": {
|
||||
"PUID": 0,
|
||||
"PGID": 0,
|
||||
"networkdisks": "<//SERVER/SHARE>,<//SERVER2/SHARE2>",
|
||||
"cifsusername": "<username>",
|
||||
"cifspassword": "<password>"
|
||||
},
|
||||
"schema": {
|
||||
"PUID": "int",
|
||||
"PGID": "int",
|
||||
"TZ": "str?",
|
||||
"networkdisks": "str?",
|
||||
"cifsusername": "str?",
|
||||
"cifspassword": "str?",
|
||||
"smbv1": "bool?"
|
||||
}
|
||||
}
|
||||
BIN
prowlarr/icon.png
Normal file
BIN
prowlarr/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
prowlarr/logo.png
Normal file
BIN
prowlarr/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
39
prowlarr/root/etc/cont-init.d/00-banner.sh
Normal file
39
prowlarr/root/etc/cont-init.d/00-banner.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# Displays a simple add-on banner on startup
|
||||
# ==============================================================================
|
||||
if bashio::supervisor.ping; then
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue " Add-on: $(bashio::addon.name)"
|
||||
bashio::log.blue " $(bashio::addon.description)"
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
|
||||
bashio::log.blue " Add-on version: $(bashio::addon.version)"
|
||||
if bashio::var.true "$(bashio::addon.update_available)"; then
|
||||
bashio::log.magenta ' There is an update available for this add-on!'
|
||||
bashio::log.magenta \
|
||||
" Latest add-on version: $(bashio::addon.version_latest)"
|
||||
bashio::log.magenta ' Please consider upgrading as soon as possible.'
|
||||
else
|
||||
bashio::log.green ' You are running the latest version of this add-on.'
|
||||
fi
|
||||
|
||||
bashio::log.blue " System: $(bashio::info.operating_system)" \
|
||||
" ($(bashio::info.arch) / $(bashio::info.machine))"
|
||||
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
|
||||
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
|
||||
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue \
|
||||
' Please, share the above information when looking for help'
|
||||
bashio::log.blue \
|
||||
' or support in, e.g., GitHub, forums or the Discord chat.'
|
||||
bashio::log.blue \
|
||||
' https://github.com/alexbelgium/hassio-addons'
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
fi
|
||||
5
prowlarr/root/etc/cont-init.d/00-ha-env
Normal file
5
prowlarr/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
|
||||
7
prowlarr/root/etc/cont-init.d/20-folders
Normal file
7
prowlarr/root/etc/cont-init.d/20-folders
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ ! -d /config/prowlarr ]; then
|
||||
echo "Creating /config/radarr"
|
||||
mkdir -p /config/prowlarr
|
||||
chown -R abc:abc /config/prowlarr
|
||||
fi
|
||||
62
prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.3.sh
Normal file
62
prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.3.sh
Normal file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
####################
|
||||
# MOUNT SMB SHARES #
|
||||
####################
|
||||
if bashio::config.has_value 'networkdisks'; then
|
||||
# Mount CIFS Share if configured and if Protection Mode is active
|
||||
bashio::log.info 'Mounting smb share(s)...'
|
||||
|
||||
# Define variables
|
||||
MOREDISKS=$(bashio::config 'networkdisks')
|
||||
CIFS_USERNAME=$(bashio::config 'cifsusername')
|
||||
CIFS_PASSWORD=$(bashio::config 'cifspassword')
|
||||
MOUNTED=false
|
||||
SMBVERS=""
|
||||
SECVERS=""
|
||||
|
||||
if bashio::config.has_value 'cifsdomain'; then
|
||||
DOMAIN=",domain=$(bashio::config 'cifsdomain')"
|
||||
else
|
||||
DOMAIN=""
|
||||
fi
|
||||
|
||||
# Mounting disks
|
||||
for disk in ${MOREDISKS//,/ } # Separate comma separated values
|
||||
do
|
||||
# Clean name of network share
|
||||
disk=$(echo $disk | sed "s,/$,,") # Remove / at end of name
|
||||
diskname=${disk//\\//} #replace \ with /
|
||||
diskname=${diskname##*/} # Get only last part of the name
|
||||
# Prepare mount point
|
||||
mkdir -p /mnt/$diskname
|
||||
chown -R root:root /mnt/$diskname
|
||||
|
||||
#Tries to mount with default options
|
||||
mount -t cifs -o rw,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$DOMAIN $disk /mnt/$diskname 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
||||
|
||||
# if Fail test different smb and sec versions
|
||||
if [ $MOUNTED = false ]; then
|
||||
for SMBVERS in ",vers=3" ",vers=1.0" ",vers=2.1" ",vers=3.0" ",nodfs" ",uid=0,gid=0,forceuid,forcegid" ",noforceuid,noforcegid" ",${DOMAIN}"
|
||||
do
|
||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS $disk /mnt/$diskname 2>/dev/null && MOUNTED=true && break || MOUNTED=false
|
||||
for SECVERS in ",sec=ntlmi" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=ntlm" ",sec=krb5i" ",sec=krb5"
|
||||
do
|
||||
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS$SECVERS $disk /mnt/$disk name 2>/dev/null && MOUNTED=true && break 2 && break || MOUNTED=false
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Messages
|
||||
if [ $MOUNTED = true ]; then
|
||||
#Test write permissions
|
||||
touch /mnt/$diskname/testaze && rm /mnt/$diskname/testaze && bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $SMBVERS$SECVERS" || bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check UID/GID for permissions, and if the share is rw"
|
||||
else
|
||||
# message if still fail
|
||||
bashio::log.fatal "Unable to mount $disk to /mnt/$diskname with username $CIFS_USERNAME, $CIFS_PASSWORD. Please check your remote share path, username, password, domain, try putting 0 in UID and GID" # Mount share
|
||||
bashio::log.fatal "Error read : $(<ERRORCODE)" # Mount share
|
||||
rm ERRORCODE
|
||||
fi
|
||||
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user