diff --git a/Dockerfile b/Dockerfile index 269ca47..6eec995 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG SONARR_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs" -# set environment variables +# environment settings ARG DEBIAN_FRONTEND="noninteractive" ENV XDG_CONFIG_HOME="/config/xdg" ENV SONARR_BRANCH="phantom-develop" @@ -41,4 +41,4 @@ COPY root/ / # ports and volumes EXPOSE 8989 -VOLUME /config /downloads /tv +VOLUME /config diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 7a279d1..0ffa6d8 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,9 +1,24 @@ #!/usr/bin/with-contenv bash +# cleanup any existing install +[[ -d /opt/sonarr ]] && \ + rm -rf /opt/sonarr +mkdir -p /opt/sonarr + +# (re)install preview version of sonarr +curl -o \ + /tmp/sonarr.tar.gz -L \ + "http://services.sonarr.tv/v1/download/phantom/latest?os=linux&version=3" +tar xf \ + /tmp/sonarr.tar.gz -C \ + /opt/sonarr --strip-components=1 +rm \ + /tmp/*.tar.gz + # cleanup pid if it exists -[[ -e /config/nzbdrone.pid ]] && \ - rm -rf /config/nzbdrone.pid +[[ -e /config/sonarr.pid ]] && \ + rm -rf /config/sonarr.pid # permissions chown -R abc:abc \ - /opt/NzbDrone + /opt/sonarr diff --git a/root/etc/services.d/sonarr/run b/root/etc/services.d/sonarr/run index 1d2c786..1a37c93 100644 --- a/root/etc/services.d/sonarr/run +++ b/root/etc/services.d/sonarr/run @@ -2,8 +2,8 @@ umask 022 -cd /opt/NzbDrone || exit +cd /opt/sonarr || exit exec \ - s6-setuidgid abc mono --debug NzbDrone.exe \ + s6-setuidgid abc mono --debug Sonarr.exe \ -nobrowser -data=/config