diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a75f9a6e9..83011fab1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -75,4 +75,17 @@ jobs: - template: .azure-pipelines/addon-template.yml parameters: addon: 'nzbget' + arch: '--all' + +- job: 'sonarr' + condition: and(eq(variables['Build.SourceBranchName'], 'master'), succeeded('Hadolint'), succeeded('JQ')) + dependsOn: + - 'Hadolint' + - 'JQ' + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: .azure-pipelines/addon-template.yml + parameters: + addon: 'sonarr' arch: '--all' \ No newline at end of file diff --git a/nzbget/config.json b/nzbget/config.json index e3838fe66..4426033c0 100644 --- a/nzbget/config.json +++ b/nzbget/config.json @@ -1,6 +1,6 @@ { "name": "nzbget", - "version": "0.1.0", + "version": "0.1.1", "slug": "nzbget", "legacy": true, "description": "Usenet downloader", diff --git a/nzbget/root/etc/cont-init.d/20-folders b/nzbget/root/etc/cont-init.d/20-folders index 10b6fae1f..caddd2479 100644 --- a/nzbget/root/etc/cont-init.d/20-folders +++ b/nzbget/root/etc/cont-init.d/20-folders @@ -1,4 +1,13 @@ #!/usr/bin/with-contenv bash -mkdir -p /share/downloads -mkdir -p /config/nzbget \ No newline at end of file +if [ ! -d /share/downloads ]; then + echo "Creating /share/downloads" + mkdir -p /share/downloads + chown -R abc:abc /share/downloads +fi + +if [ ! -d /config/nzbget ]; then + echo "Creating /config/nzbget" + mkdir -p /config/nzbget + chown -R abc:abc /config/nzbget +fi \ No newline at end of file diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile new file mode 100644 index 000000000..3c2e5cc19 --- /dev/null +++ b/sonarr/Dockerfile @@ -0,0 +1,8 @@ +FROM linuxserver/sonarr:2.0.0.5322-ls18 + +# 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 + +# copy local files +COPY root/ / diff --git a/sonarr/README.md b/sonarr/README.md new file mode 100644 index 000000000..6127fbd9d --- /dev/null +++ b/sonarr/README.md @@ -0,0 +1,27 @@ +# Hassio Add-ons by petersendev: Sonarr + +## About + +[Sonarr](https://sonarr.tv/) (formerly NZBdrone) is a PVR for usenet and bittorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. + +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 `:8989`. + + +[repository]: https://github.com/petersendev/hassio-addons \ No newline at end of file diff --git a/sonarr/config.json b/sonarr/config.json new file mode 100644 index 000000000..b98269c4d --- /dev/null +++ b/sonarr/config.json @@ -0,0 +1,37 @@ +{ + "name": "sonarr", + "version": "0.1.0", + "slug": "sonarr", + "legacy": true, + "description": "PVR for usenet and bittorrent users", + "url": "https://github.com/petersendev/hassio-addons/sonarr", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armhf" + ], + "ports": { + "8989/tcp": 8989 + }, + "ports_description": { + "8989/tcp": "web interface" + }, + "map": [ + "config:rw", + "share:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:8989]", + "boot": "auto", + "options": { + "PUID": 1001, + "PGID": 1001 + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?" + }, + "image": "petersendev/hassio-sonarr-{arch}" + } \ No newline at end of file diff --git a/sonarr/icon.png b/sonarr/icon.png new file mode 100644 index 000000000..22932894e Binary files /dev/null and b/sonarr/icon.png differ diff --git a/sonarr/logo.png b/sonarr/logo.png new file mode 100644 index 000000000..22932894e Binary files /dev/null and b/sonarr/logo.png differ diff --git a/sonarr/root/etc/cont-init.d/20-folders b/sonarr/root/etc/cont-init.d/20-folders new file mode 100644 index 000000000..e612a4ac2 --- /dev/null +++ b/sonarr/root/etc/cont-init.d/20-folders @@ -0,0 +1,19 @@ +#!/usr/bin/with-contenv bash + +if [ ! -d /share/storage/tv ]; then + echo "Creating /share/storage/tv" + mkdir -p /share/storage/tv + chown -R abc:abc /share/storage/tv +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