diff --git a/radarr/CHANGELOG.md b/radarr/CHANGELOG.md new file mode 100644 index 000000000..17608c7cc --- /dev/null +++ b/radarr/CHANGELOG.md @@ -0,0 +1,27 @@ +## 0.6.1 + + - Mount /media folder + +## 0.6.0 + + - Update radarr to 0.2.0.1504 (linuxserver/radarr:v0.2.0.1504-ls68) + +## 0.5.0 + + - not a legacy addon anymore + + ## 0.4.0 + + - Update radarr to 0.2.0.1480 (linuxserver/radarr:v0.2.0.1480-ls51) + +## 0.3.2 + + - set snapshot_exclude for logs and MediaCover + +## 0.3.0 + + - Update radarr to 0.2.0.1450 (linuxserver/radarr:v0.2.0.1450-ls46) + +## 0.2.0 + + - Update radarr to 0.2.0.1358 (linuxserver/radarr:v0.2.0.1358-ls22) \ No newline at end of file diff --git a/radarr/Dockerfile b/radarr/Dockerfile new file mode 100644 index 000000000..2552c0b82 --- /dev/null +++ b/radarr/Dockerfile @@ -0,0 +1,22 @@ +ARG BUILD_FROM +ARG BUILD_VERSION + +FROM ${BUILD_FROM}-${BUILD_VERSION} + +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/* + +# use /data instead of /config for hass.io environment +RUN sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \ + && sed -i "s|/config|/config/radarr|g" /etc/cont-init.d/30-config + +# copy local files +COPY root/ / diff --git a/radarr/README.md b/radarr/README.md new file mode 100644 index 000000000..ebfe51747 --- /dev/null +++ b/radarr/README.md @@ -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 `: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 diff --git a/radarr/build.json b/radarr/build.json new file mode 100644 index 000000000..10cd634e0 --- /dev/null +++ b/radarr/build.json @@ -0,0 +1,10 @@ +{ + "build_from": { + "armhf": "linuxserver/radarr:arm32v7", + "armv7": "linuxserver/radarr:arm32v7", + "aarch64": "linuxserver/radarr:arm64v8", + "amd64": "linuxserver/radarr:amd64" + }, + "squash": false, + "args": {} +} diff --git a/radarr/config.json b/radarr/config.json new file mode 100644 index 000000000..5f8e85615 --- /dev/null +++ b/radarr/config.json @@ -0,0 +1,57 @@ +{ + "name": "radarr NAS", + "version": "v0.2.0.1504-ls68", + "slug": "radarr_nas", + "legacy": false, + "maintenance": { + "github_release": "https://github.com/linuxserver/docker-radarr", + "version_regex": "v(\\d+\\.\\d+\\.\\d+\\.\\d+)-(ls\\d+)" + }, + "description": "A fork of Sonarr to work with movies like Couchpotato", + "url": "https://github.com/alexbelgium/hassio-addons/tree/master/radarr#readme", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armv7", + "armhf" + ], + "ports": { + "7878/tcp": 7878 + }, + "ports_description": { + "7878/tcp": "web interface" + }, + "map": [ + "config:rw", + "share:rw", + "media:rw", + "ssl" + ], + "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], + "full_access": true, + "webui": "http://[HOST]:[PORT:7878]", + "boot": "auto", + "options": { + "PUID": 1001, + "PGID": 1001, + "localdisks": ["sda1"], + "networkdisks": "", + "cifsusername": "", + "cifspassword": "" + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?", + "localdisks": ["str"], + "networkdisks": "str", + "cifsusername": "str", + "cifspassword": "str" + }, + "snapshot_exclude": [ + "**/Backups/*", + "**/logs/*", + "**/MediaCover/*" + ] +} diff --git a/radarr/icon.png b/radarr/icon.png new file mode 100644 index 000000000..5e143b52e Binary files /dev/null and b/radarr/icon.png differ diff --git a/radarr/logo.png b/radarr/logo.png new file mode 100644 index 000000000..5e143b52e Binary files /dev/null and b/radarr/logo.png differ diff --git a/radarr/root/etc/cont-init.d/00-ha-env b/radarr/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/radarr/root/etc/cont-init.d/00-ha-env @@ -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 \ No newline at end of file diff --git a/radarr/root/etc/cont-init.d/20-folders b/radarr/root/etc/cont-init.d/20-folders new file mode 100644 index 000000000..9fcadd756 --- /dev/null +++ b/radarr/root/etc/cont-init.d/20-folders @@ -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/radarr ]; then + echo "Creating /config/radarr" + mkdir -p /config/radarr + chown -R abc:abc /config/radarr +fi diff --git a/radarr/root/etc/cont-init.d/50-mounts b/radarr/root/etc/cont-init.d/50-mounts new file mode 100644 index 000000000..e7fb49d35 --- /dev/null +++ b/radarr/root/etc/cont-init.d/50-mounts @@ -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