From 71b5d30a8f41f50cea06ba625f9fa54b31c0fa76 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 16:28:55 -0700 Subject: [PATCH 01/78] Update update.sh --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 89c8907..0e21681 100755 --- a/update.sh +++ b/update.sh @@ -3,7 +3,7 @@ PLEX_REPORT_LIB='/var/lib/plexReport' PLEX_REPORT_CONF='/etc/plexReport' -/bin/echo "Grabbing newest code from https://github.com/bstascavage/plexReport" +/bin/echo "Grabbing newest code from https://github.com/ninthwalker/plexReport" /usr/bin/git pull /bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" From 38942b81c7b800c67b1cb2af73423d45a6b23922 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 16:31:44 -0700 Subject: [PATCH 02/78] Update initial_setup.sh --- initial_setup.sh | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 366eb88..22e288e 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -6,41 +6,41 @@ PLEX_REPORT_LIB='/var/lib/plexReport' PLEX_REPORT_CONF='/etc/plexReport' -/bin/echo "Creating plexreport library at /var/lib/plexReport" +#/bin/echo "Creating plexreport library at /var/lib/plexReport" /bin/mkdir -p $PLEX_REPORT_LIB -/bin/echo "Creating plexreport conf directory at /etc/plexReport" +#/bin/echo "Creating plexreport conf directory at /etc/plexReport" /bin/mkdir -p $PLEX_REPORT_CONF -/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" +#/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" /bin/cp -r bin/* /usr/local/sbin -/bin/echo "Moving plexreport libraries to /var/lib/plexreport" +#/bin/echo "Moving plexreport libraries to /var/lib/plexreport" /bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexreport" +#/bin/echo "Moving email_body.erb to /etc/plexreport" /bin/cp -r etc/* $PLEX_REPORT_CONF -/bin/echo "Creating /etc/plexreport/config.yaml" +#/bin/echo "Creating /etc/plexreport/config.yaml" /usr/bin/touch /etc/plexReport/config.yaml -/bin/echo "Creating /var/log/plexReport.log" +#/bin/echo "Creating /var/log/plexReport.log" /usr/bin/touch /var/log/plexReport.log -/bin/echo "Installing ruby gem dependency" +#/bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler /usr/local/bin/bundle install -/bin/echo "Running /usr/local/sbin/plexreport-setup" -/usr/local/sbin/plexreport-setup +#/bin/echo "Running /usr/local/sbin/plexreport-setup" +#/usr/local/sbin/plexreport-setup -/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" -read CRON_DAY -/bin/echo "What hour should the script run? (00-23)" -read CRON_HOUR -/bin/echo "What minute in that hour should the script run? (00-59)" -read CRON_MINUTE +#/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" +#read CRON_DAY +#/bin/echo "What hour should the script run? (00-23)" +#read CRON_HOUR +#/bin/echo "What minute in that hour should the script run? (00-59)" +#read CRON_MINUTE -/bin/echo "Adding /usr/local/sbin/plexreport to crontab" -/usr/bin/crontab -l > mycron -/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron -/usr/bin/crontab mycron -/bin/rm mycron +#/bin/echo "Adding /usr/local/sbin/plexreport to crontab" +#/usr/bin/crontab -l > mycron +#/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron +#/usr/bin/crontab mycron +#/bin/rm mycron -/bin/echo "Setup complete!" +#/bin/echo "Setup complete!" From d96869ff3f35ac56d82b029da82742a47effc1cf Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 16:43:05 -0700 Subject: [PATCH 03/78] Create Dockerfile --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc7cb6c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM phusion/baseimage:0.9.15 + +# Set correct environment variables +ENV HOME /root +ENV DEBIAN_FRONTEND noninteractive +ENV LC_ALL C.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US.UTF-8 + +# Use baseimage-docker's init system +CMD ["/sbin/my_init"] + +# Configure user nobody to match unRAID's settings + RUN \ + usermod -u 99 nobody && \ + usermod -g 100 nobody && \ + usermod -d /home nobody && \ + chown -R nobody:users /home + +# Disable SSH +RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh + +RUN \ + add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ + add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ + apt-get update -q && \ + apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ + apt-get clean -y && \ + rm -rf /var/lib/apt/lists/* && \ + git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport && \ + cd /opt/plexReport/ && \ + gem install bundle && \ + bundle install && \ + + #Adding Custom files + COPY initial_setup.sh /etc/my_init.d/ + RUN chmod -v +x /etc/my_init.d/*.sh + ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb + +#Mappings and ports +VOLUME ["/config"] From b104e435575e06c50d03f3dad69997baa730ec19 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:04:45 -0700 Subject: [PATCH 04/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cc7cb6c..c9fe1bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN \ bundle install && \ #Adding Custom files - COPY initial_setup.sh /etc/my_init.d/ + COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ RUN chmod -v +x /etc/my_init.d/*.sh ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb From 4468f57b08c811f0290e85db36f83537c647ace3 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:15:24 -0700 Subject: [PATCH 05/78] Update Dockerfile --- Dockerfile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9fe1bd..a9fefe6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,22 +20,21 @@ CMD ["/sbin/my_init"] # Disable SSH RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh -RUN \ - add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ - add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ - apt-get update -q && \ - apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ - apt-get clean -y && \ - rm -rf /var/lib/apt/lists/* && \ - git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport && \ - cd /opt/plexReport/ && \ - gem install bundle && \ - bundle install && \ +RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" +RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" +RUN apt-get update -q +RUN apt-get install -qy ruby ruby-dev git make gcc inotify-tools +RUN apt-get clean -y +RUN rm -rf /var/lib/apt/lists/* +RUN git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport +RUN cd /opt/plexReport/ +RUN gem install bundle +RUN bundle install - #Adding Custom files - COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ - RUN chmod -v +x /etc/my_init.d/*.sh - ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb +#Adding Custom files +COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ +RUN chmod -v +x /etc/my_init.d/*.sh +ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb #Mappings and ports VOLUME ["/config"] From 6ab427bdb69019276de1ff123b19f496eae33493 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:25:52 -0700 Subject: [PATCH 06/78] Update Dockerfile --- Dockerfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a9fefe6..eeb73b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,18 @@ CMD ["/sbin/my_init"] # Disable SSH RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh -RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" -RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" -RUN apt-get update -q -RUN apt-get install -qy ruby ruby-dev git make gcc inotify-tools -RUN apt-get clean -y -RUN rm -rf /var/lib/apt/lists/* -RUN git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport -RUN cd /opt/plexReport/ -RUN gem install bundle -RUN bundle install +RUN \ +add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ +add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ +apt-get update -q && \ +apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ +apt-get clean -y && \ +rm -rf /var/lib/apt/lists/* && \ +git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport && \ +cd /opt/plexReport/ && \ +gem install bundle && \ + +RUN bundle update #Adding Custom files COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ From 287c40d194f621d77662feaed7d96d6267e744ec Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:30:24 -0700 Subject: [PATCH 07/78] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index eeb73b2..e4e095b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,9 @@ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport && \ cd /opt/plexReport/ && \ -gem install bundle && \ +gem install bundle -RUN bundle update +# RUN bundle update #Adding Custom files COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ From 19c55365e69de287eebf901847862d1da82f6c1c Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:43:05 -0700 Subject: [PATCH 08/78] Create initial_setup.sh --- scripts/initial_setup.sh | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/initial_setup.sh diff --git a/scripts/initial_setup.sh b/scripts/initial_setup.sh new file mode 100644 index 0000000..22e288e --- /dev/null +++ b/scripts/initial_setup.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Bash script that copies plexreport files to various directories +# and walks the user through the initial setup +# + +PLEX_REPORT_LIB='/var/lib/plexReport' +PLEX_REPORT_CONF='/etc/plexReport' + +#/bin/echo "Creating plexreport library at /var/lib/plexReport" +/bin/mkdir -p $PLEX_REPORT_LIB +#/bin/echo "Creating plexreport conf directory at /etc/plexReport" +/bin/mkdir -p $PLEX_REPORT_CONF + +#/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" +/bin/cp -r bin/* /usr/local/sbin +#/bin/echo "Moving plexreport libraries to /var/lib/plexreport" +/bin/cp -r lib/* $PLEX_REPORT_LIB +#/bin/echo "Moving email_body.erb to /etc/plexreport" +/bin/cp -r etc/* $PLEX_REPORT_CONF + +#/bin/echo "Creating /etc/plexreport/config.yaml" +/usr/bin/touch /etc/plexReport/config.yaml +#/bin/echo "Creating /var/log/plexReport.log" +/usr/bin/touch /var/log/plexReport.log + +#/bin/echo "Installing ruby gem dependency" +/usr/bin/gem install bundler +/usr/local/bin/bundle install + +#/bin/echo "Running /usr/local/sbin/plexreport-setup" +#/usr/local/sbin/plexreport-setup + +#/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" +#read CRON_DAY +#/bin/echo "What hour should the script run? (00-23)" +#read CRON_HOUR +#/bin/echo "What minute in that hour should the script run? (00-59)" +#read CRON_MINUTE + +#/bin/echo "Adding /usr/local/sbin/plexreport to crontab" +#/usr/bin/crontab -l > mycron +#/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron +#/usr/bin/crontab mycron +#/bin/rm mycron + +#/bin/echo "Setup complete!" From 763caba3b97af19b24d4e6e2032d9d48911e0add Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:45:22 -0700 Subject: [PATCH 09/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e4e095b..a72b6a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ gem install bundle # RUN bundle update #Adding Custom files -COPY /opt/plexReport/initial_setup.sh /etc/my_init.d/ +COPY scripts/ /etc/my_init.d/ RUN chmod -v +x /etc/my_init.d/*.sh ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb From 594037c4b9d8195e58d5a743b1c6b75f73633d7e Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:48:37 -0700 Subject: [PATCH 10/78] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a72b6a2..841cca7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,8 @@ gem install bundle #Adding Custom files COPY scripts/ /etc/my_init.d/ RUN chmod -v +x /etc/my_init.d/*.sh -ln -s /config/config.yaml /etc/plexReport/config.yaml && \ ln -s /config/email_body.erb /etc/plexReport/email_body.erb +RUN ln -s /config/config.yaml /etc/plexReport/config.yaml && \ +ln -s /config/email_body.erb /etc/plexReport/email_body.erb #Mappings and ports VOLUME ["/config"] From 35ebdbdbf9b3d0de04d4fc5c3ee5325b111416bb Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:55:10 -0700 Subject: [PATCH 11/78] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 841cca7..5ec7a90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,8 @@ gem install bundle #Adding Custom files COPY scripts/ /etc/my_init.d/ RUN chmod -v +x /etc/my_init.d/*.sh -RUN ln -s /config/config.yaml /etc/plexReport/config.yaml && \ -ln -s /config/email_body.erb /etc/plexReport/email_body.erb +RUN ln -s /etc/plexReport/config.yaml /config/config.yaml && \ +ln -s /etc/plexReport/email_body.erb /config/email_body.erb #Mappings and ports VOLUME ["/config"] From e06c2d64d295b3f5d78c8c966b1e3f809b6996f4 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 17:59:54 -0700 Subject: [PATCH 12/78] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ec7a90..0683b70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,8 @@ gem install bundle #Adding Custom files COPY scripts/ /etc/my_init.d/ RUN chmod -v +x /etc/my_init.d/*.sh -RUN ln -s /etc/plexReport/config.yaml /config/config.yaml && \ -ln -s /etc/plexReport/email_body.erb /config/email_body.erb +# RUN ln -s /etc/plexReport/config.yaml /config/config.yaml && \ +# ln -s /etc/plexReport/email_body.erb /config/email_body.erb #Mappings and ports VOLUME ["/config"] From 04969a492a38922cd2c6cfd43d44dc29cfa398bb Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:25:02 -0700 Subject: [PATCH 13/78] Update Dockerfile --- Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0683b70..a15928d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,14 +24,20 @@ RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ +apt-get install -y curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ -git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport && \ -cd /opt/plexReport/ && \ -gem install bundle +useradd -ms /bin/bash app -# RUN bundle update +USER app + +RUN \ +gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 && \ +/bin/bash -l -c "curl -L get.rvm.io | bash -s stable --rails" && \ +/bin/bash -l -c "rvm install 2.1" && \ +/bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" && \ +/bin/bash -l -c "gem install bundler --no-ri --no-rdoc" && \ +git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport #Adding Custom files COPY scripts/ /etc/my_init.d/ From f9a51fbb667369c96971db348f8b5a66dd19758d Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:31:00 -0700 Subject: [PATCH 14/78] Update Dockerfile --- Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index a15928d..69752c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,19 +24,9 @@ RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -y curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev && \ +apt-get install -y ruby ruby-dev ruby-bundler && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ -useradd -ms /bin/bash app - -USER app - -RUN \ -gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 && \ -/bin/bash -l -c "curl -L get.rvm.io | bash -s stable --rails" && \ -/bin/bash -l -c "rvm install 2.1" && \ -/bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" && \ -/bin/bash -l -c "gem install bundler --no-ri --no-rdoc" && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport #Adding Custom files From 2fbeeba145b2a0ed7b580fefa3f6688f5d84eb6f Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:34:24 -0700 Subject: [PATCH 15/78] Update initial_setup.sh --- initial_setup.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 22e288e..6efe468 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -6,29 +6,29 @@ PLEX_REPORT_LIB='/var/lib/plexReport' PLEX_REPORT_CONF='/etc/plexReport' -#/bin/echo "Creating plexreport library at /var/lib/plexReport" +/bin/echo "Creating plexreport library at /var/lib/plexReport" /bin/mkdir -p $PLEX_REPORT_LIB -#/bin/echo "Creating plexreport conf directory at /etc/plexReport" +/bin/echo "Creating plexreport conf directory at /etc/plexReport" /bin/mkdir -p $PLEX_REPORT_CONF -#/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" +/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" /bin/cp -r bin/* /usr/local/sbin -#/bin/echo "Moving plexreport libraries to /var/lib/plexreport" +/bin/echo "Moving plexreport libraries to /var/lib/plexreport" /bin/cp -r lib/* $PLEX_REPORT_LIB -#/bin/echo "Moving email_body.erb to /etc/plexreport" +/bin/echo "Moving email_body.erb to /etc/plexreport" /bin/cp -r etc/* $PLEX_REPORT_CONF -#/bin/echo "Creating /etc/plexreport/config.yaml" +/bin/echo "Creating /etc/plexreport/config.yaml" /usr/bin/touch /etc/plexReport/config.yaml -#/bin/echo "Creating /var/log/plexReport.log" +/bin/echo "Creating /var/log/plexReport.log" /usr/bin/touch /var/log/plexReport.log -#/bin/echo "Installing ruby gem dependency" +/bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler /usr/local/bin/bundle install -#/bin/echo "Running /usr/local/sbin/plexreport-setup" -#/usr/local/sbin/plexreport-setup +/bin/echo "Running /usr/local/sbin/plexreport-setup" +/usr/local/sbin/plexreport-setup #/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" #read CRON_DAY @@ -43,4 +43,4 @@ PLEX_REPORT_CONF='/etc/plexReport' #/usr/bin/crontab mycron #/bin/rm mycron -#/bin/echo "Setup complete!" +/bin/echo "Setup complete! Please create a cronjob from withinunraid to call the plexReport" From 15ae36349798bb56d7e53560d42f1138afa42791 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:37:08 -0700 Subject: [PATCH 16/78] Update Dockerfile --- Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 69752c5..fa240ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,16 +24,10 @@ RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -y ruby ruby-dev ruby-bundler && \ +apt-get install -qy ruby ruby-dev ruby-bundler && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport - -#Adding Custom files -COPY scripts/ /etc/my_init.d/ -RUN chmod -v +x /etc/my_init.d/*.sh -# RUN ln -s /etc/plexReport/config.yaml /config/config.yaml && \ -# ln -s /etc/plexReport/email_body.erb /config/email_body.erb #Mappings and ports VOLUME ["/config"] From e76eab8afcd763eab493b207a2d8496660ed2571 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:37:49 -0700 Subject: [PATCH 17/78] Delete initial_setup.sh --- scripts/initial_setup.sh | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 scripts/initial_setup.sh diff --git a/scripts/initial_setup.sh b/scripts/initial_setup.sh deleted file mode 100644 index 22e288e..0000000 --- a/scripts/initial_setup.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Bash script that copies plexreport files to various directories -# and walks the user through the initial setup -# - -PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/etc/plexReport' - -#/bin/echo "Creating plexreport library at /var/lib/plexReport" -/bin/mkdir -p $PLEX_REPORT_LIB -#/bin/echo "Creating plexreport conf directory at /etc/plexReport" -/bin/mkdir -p $PLEX_REPORT_CONF - -#/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" -/bin/cp -r bin/* /usr/local/sbin -#/bin/echo "Moving plexreport libraries to /var/lib/plexreport" -/bin/cp -r lib/* $PLEX_REPORT_LIB -#/bin/echo "Moving email_body.erb to /etc/plexreport" -/bin/cp -r etc/* $PLEX_REPORT_CONF - -#/bin/echo "Creating /etc/plexreport/config.yaml" -/usr/bin/touch /etc/plexReport/config.yaml -#/bin/echo "Creating /var/log/plexReport.log" -/usr/bin/touch /var/log/plexReport.log - -#/bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler -/usr/local/bin/bundle install - -#/bin/echo "Running /usr/local/sbin/plexreport-setup" -#/usr/local/sbin/plexreport-setup - -#/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" -#read CRON_DAY -#/bin/echo "What hour should the script run? (00-23)" -#read CRON_HOUR -#/bin/echo "What minute in that hour should the script run? (00-59)" -#read CRON_MINUTE - -#/bin/echo "Adding /usr/local/sbin/plexreport to crontab" -#/usr/bin/crontab -l > mycron -#/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron -#/usr/bin/crontab mycron -#/bin/rm mycron - -#/bin/echo "Setup complete!" From 968aed5de40e5fb06a83cbd0e61e98ec68fd8363 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:38:34 -0700 Subject: [PATCH 18/78] Update initial_setup.sh --- initial_setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/initial_setup.sh b/initial_setup.sh index 6efe468..7756785 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -27,6 +27,9 @@ PLEX_REPORT_CONF='/etc/plexReport' /usr/bin/gem install bundler /usr/local/bin/bundle install +ln -s /etc/plexReport/config.yaml /config/config.yaml +ln -s /etc/plexReport/email_body.erb /config/email_body.erb + /bin/echo "Running /usr/local/sbin/plexreport-setup" /usr/local/sbin/plexreport-setup From 99b6df17ca8c21df58c1dd7a9f9bbf11c0021263 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:41:51 -0700 Subject: [PATCH 19/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa240ab..641e8aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -qy ruby ruby-dev ruby-bundler && \ +apt-get install -qy ruby ruby-dev && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport From e3b16acf5f7fda0a47d8e00b12194c64be29ace7 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 18:46:52 -0700 Subject: [PATCH 20/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 641e8aa..b1c35f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -qy ruby ruby-dev && \ +apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport From c8150121cb6c2f6b45bf57ae760c5b89a329e6bd Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:16:32 -0700 Subject: [PATCH 21/78] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b1c35f3..dc3b85d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ FROM phusion/baseimage:0.9.15 +MAINTAINER: ninthwalker@gmail.com # Set correct environment variables ENV HOME /root @@ -30,4 +31,4 @@ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport #Mappings and ports -VOLUME ["/config"] +VOLUME /config From 56a36f35c17d29a355b0a4cc20385556d25929ee Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:28:43 -0700 Subject: [PATCH 22/78] Update initial_setup.sh --- initial_setup.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 7756785..65c08ab 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -27,9 +27,6 @@ PLEX_REPORT_CONF='/etc/plexReport' /usr/bin/gem install bundler /usr/local/bin/bundle install -ln -s /etc/plexReport/config.yaml /config/config.yaml -ln -s /etc/plexReport/email_body.erb /config/email_body.erb - /bin/echo "Running /usr/local/sbin/plexreport-setup" /usr/local/sbin/plexreport-setup @@ -46,4 +43,4 @@ ln -s /etc/plexReport/email_body.erb /config/email_body.erb #/usr/bin/crontab mycron #/bin/rm mycron -/bin/echo "Setup complete! Please create a cronjob from withinunraid to call the plexReport" +/bin/echo "Setup complete! Please create a cronjob from within unraid to call the plexReport on a schedule." From bb4556a45527632007c51cc17ecb003d66356a00 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:46:54 -0700 Subject: [PATCH 23/78] Update Dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index dc3b85d..c1be340 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,9 @@ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport +ln -s /config/config.yaml /opt/plexReport/etc/config.yaml && \ +ln -s /opt/plexReport/plexReport.log /config/plexReport.log && \ +ln -s /config/email_body.erb /opt/plexReport/etc/email_body.erb #Mappings and ports VOLUME /config From 2654e2d072d2ab2606bc597957fff7a53c2945ef Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:50:42 -0700 Subject: [PATCH 24/78] Create firstrun.sh --- firstrun.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 firstrun.sh diff --git a/firstrun.sh b/firstrun.sh new file mode 100644 index 0000000..5094b6d --- /dev/null +++ b/firstrun.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Check if config exists. If not, copy in the sample config +if [ -f /config/config.yaml ]; then + echo "Using existing config file." +else + echo "Creating config from template." + mv /opt/plexReport/etc/config.yaml.example /config/config.yaml + chown nobody:users /config/config.yaml +fi + +# Check if email_body.erb exists. If not, copy the original +if [ -f /config/email_body.erb ]; then + echo "Using existing email_body file." +else + echo "Creating email_body from template." + cp /opt/plexReport/etc/email_body.erb /config/email_body.erb + chown nobody:users /config/email_body.erb +fi From e92cd6ef399f560d0285146114b466af6f2c3aa0 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:52:03 -0700 Subject: [PATCH 25/78] Update Dockerfile --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index c1be340..dd3d90c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,3 +35,8 @@ ln -s /config/email_body.erb /opt/plexReport/etc/email_body.erb #Mappings and ports VOLUME /config + + +# Add firstrun.sh to execute during container startup +ADD firstrun.sh /etc/my_init.d/firstrun.sh +RUN chmod +x /etc/my_init.d/firstrun.sh From 4500793c7cf84d4f74d2ef95a9143cc70d23f6eb Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 21:53:13 -0700 Subject: [PATCH 26/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dd3d90c..009598a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM phusion/baseimage:0.9.15 -MAINTAINER: ninthwalker@gmail.com +MAINTAINER ninthwalker # Set correct environment variables ENV HOME /root From f750f73fdf8d998716937284580daec4357629d7 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 22:03:47 -0700 Subject: [PATCH 27/78] Update Dockerfile --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 009598a..69e64f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,6 @@ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport -ln -s /config/config.yaml /opt/plexReport/etc/config.yaml && \ -ln -s /opt/plexReport/plexReport.log /config/plexReport.log && \ -ln -s /config/email_body.erb /opt/plexReport/etc/email_body.erb #Mappings and ports VOLUME /config From 641b6a0bff4f3e9080c6429147aae7a8992688d1 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 22:12:51 -0700 Subject: [PATCH 28/78] Update firstrun.sh --- firstrun.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firstrun.sh b/firstrun.sh index 5094b6d..50069ec 100644 --- a/firstrun.sh +++ b/firstrun.sh @@ -1,19 +1,26 @@ #!/bin/bash +# link log +ln -s /opt/plexReport/plexReport.log /config/plexReport.log # Check if config exists. If not, copy in the sample config if [ -f /config/config.yaml ]; then echo "Using existing config file." + ln -s /config/config.yaml /etc/plexReport/config.yaml else echo "Creating config from template." mv /opt/plexReport/etc/config.yaml.example /config/config.yaml chown nobody:users /config/config.yaml + ln -s /config/config.yaml /etc/plexReport/config.yaml fi # Check if email_body.erb exists. If not, copy the original if [ -f /config/email_body.erb ]; then echo "Using existing email_body file." + ln -s /config/email_body.erb /etc/plexReport/email_body.erb else echo "Creating email_body from template." cp /opt/plexReport/etc/email_body.erb /config/email_body.erb chown nobody:users /config/email_body.erb + ln -s /config/email_body.erb /etc/plexReport/email_body.erb fi + From b49b28cd90bfe5be7a219a22e0136b130f7d961e Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 22:50:46 -0700 Subject: [PATCH 29/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 69e64f6..fde1acf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport #Mappings and ports -VOLUME /config +VOLUME /etc/plexReport # Add firstrun.sh to execute during container startup From 0d3b10a702eea6119b811a8d12c1e900a2b9b4e0 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 22:52:01 -0700 Subject: [PATCH 30/78] Delete firstrun.sh --- firstrun.sh | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 firstrun.sh diff --git a/firstrun.sh b/firstrun.sh deleted file mode 100644 index 50069ec..0000000 --- a/firstrun.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# link log -ln -s /opt/plexReport/plexReport.log /config/plexReport.log -# Check if config exists. If not, copy in the sample config -if [ -f /config/config.yaml ]; then - echo "Using existing config file." - ln -s /config/config.yaml /etc/plexReport/config.yaml -else - echo "Creating config from template." - mv /opt/plexReport/etc/config.yaml.example /config/config.yaml - chown nobody:users /config/config.yaml - ln -s /config/config.yaml /etc/plexReport/config.yaml -fi - -# Check if email_body.erb exists. If not, copy the original -if [ -f /config/email_body.erb ]; then - echo "Using existing email_body file." - ln -s /config/email_body.erb /etc/plexReport/email_body.erb -else - echo "Creating email_body from template." - cp /opt/plexReport/etc/email_body.erb /config/email_body.erb - chown nobody:users /config/email_body.erb - ln -s /config/email_body.erb /etc/plexReport/email_body.erb -fi - From 681b08125004f58f44789bc29d022b038918b566 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 22:52:34 -0700 Subject: [PATCH 31/78] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fde1acf..f2366e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,5 +35,5 @@ VOLUME /etc/plexReport # Add firstrun.sh to execute during container startup -ADD firstrun.sh /etc/my_init.d/firstrun.sh -RUN chmod +x /etc/my_init.d/firstrun.sh +# ADD firstrun.sh /etc/my_init.d/firstrun.sh +# RUN chmod +x /etc/my_init.d/firstrun.sh From 719bbcd4fe835c5eff117d0540cf5e52d77f7c6c Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 23:16:48 -0700 Subject: [PATCH 32/78] Update Dockerfile --- Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index f2366e3..45e3ab1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,4 @@ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport #Mappings and ports -VOLUME /etc/plexReport - - -# Add firstrun.sh to execute during container startup -# ADD firstrun.sh /etc/my_init.d/firstrun.sh -# RUN chmod +x /etc/my_init.d/firstrun.sh +VOLUME /config From cab18d0dddb916d6cc3a98fc6c4ecc734f7c02e8 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 23:33:11 -0700 Subject: [PATCH 33/78] Update initial_setup.sh --- initial_setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/initial_setup.sh b/initial_setup.sh index 65c08ab..036ad02 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -23,6 +23,9 @@ PLEX_REPORT_CONF='/etc/plexReport' /bin/echo "Creating /var/log/plexReport.log" /usr/bin/touch /var/log/plexReport.log +ln -s /etc/plexReport/config.yaml /config/config.yaml +ln -s /etc/plexReport/email_body.erb /config/email_body.erb + /bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler /usr/local/bin/bundle install From 98f3524a999f42fda714dbb95084ea3c6c15947a Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 19 Apr 2016 23:33:38 -0700 Subject: [PATCH 34/78] Update Dockerfile --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45e3ab1..a7914d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,3 @@ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport - -#Mappings and ports -VOLUME /config From 91d043cd41ef1865405d09600519849c777e0f0c Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 00:17:31 -0700 Subject: [PATCH 35/78] Create firstrun.sh --- firstrun.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 firstrun.sh diff --git a/firstrun.sh b/firstrun.sh new file mode 100644 index 0000000..201f6cb --- /dev/null +++ b/firstrun.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Check if config exists. If not, copy in the sample config +if [ -f /config/config.yaml ]; then + echo "Using existing config file." + ln -s /config/config.yaml /etc/plexReport/config.yaml +else + echo "Creating config from template." + mv /opt/plexReport/etc/config.yaml.example /config/config.yaml + chown nobody:users /config/config.yaml + ln -s /config/config.yaml /etc/plexReport/config.yaml +fi + +# Check if email_body.erb exists. If not, copy the original +if [ -f /config/email_body.erb ]; then + echo "Using existing email_body file." + ln -s /config/email_body.erb /etc/plexReport/email_body.erb +else + echo "Creating email_body from template." + cp /opt/plexReport/etc/email_body.erb /config/email_body.erb + chown nobody:users /config/email_body.erb + ln -s /config/email_body.erb /etc/plexReport/email_body.erb +fi From 8fe549d191850b1f591b7068e1ab59d693c75eae Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 00:19:15 -0700 Subject: [PATCH 36/78] Update Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index a7914d4..2dc6297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,3 +29,7 @@ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport + +# Add firstrun.sh to execute during container startup +ADD firstrun.sh /etc/my_init.d/firstrun.sh +RUN chmod +x /etc/my_init.d/firstrun.sh From 55ed0ebc7edee6369ade0e1ce3a7a1432bd18c9f Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 00:37:03 -0700 Subject: [PATCH 37/78] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2dc6297..3dbed12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,5 +31,5 @@ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport # Add firstrun.sh to execute during container startup -ADD firstrun.sh /etc/my_init.d/firstrun.sh -RUN chmod +x /etc/my_init.d/firstrun.sh +# ADD firstrun.sh /etc/my_init.d/firstrun.sh +# RUN chmod +x /etc/my_init.d/firstrun.sh From 293df9c1a61011b3c8ca784e474a3f31288f571e Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 00:39:07 -0700 Subject: [PATCH 38/78] Update initial_setup.sh --- initial_setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 036ad02..6e23aae 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -23,8 +23,8 @@ PLEX_REPORT_CONF='/etc/plexReport' /bin/echo "Creating /var/log/plexReport.log" /usr/bin/touch /var/log/plexReport.log -ln -s /etc/plexReport/config.yaml /config/config.yaml -ln -s /etc/plexReport/email_body.erb /config/email_body.erb +ln -s /config/config.yaml /etc/plexReport/config.yaml +ln -s /config/email_body.erb /etc/plexReport/email_body.erb /bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler From 66999c39343f2c2a005629135198cae9ae83f4e6 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 01:11:28 -0700 Subject: [PATCH 39/78] Update initial_setup.sh --- initial_setup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 6e23aae..8a46f19 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -5,6 +5,7 @@ PLEX_REPORT_LIB='/var/lib/plexReport' PLEX_REPORT_CONF='/etc/plexReport' +PLEX_REPORT_EDIT='/config' /bin/echo "Creating plexreport library at /var/lib/plexReport" /bin/mkdir -p $PLEX_REPORT_LIB @@ -15,17 +16,15 @@ PLEX_REPORT_CONF='/etc/plexReport' /bin/cp -r bin/* /usr/local/sbin /bin/echo "Moving plexreport libraries to /var/lib/plexreport" /bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexreport" +/bin/echo "Moving email_body.erb to /etc/plexreport & /config" /bin/cp -r etc/* $PLEX_REPORT_CONF +/bin/cp -r etc/* $PLEX_REPORT_EDIT /bin/echo "Creating /etc/plexreport/config.yaml" /usr/bin/touch /etc/plexReport/config.yaml /bin/echo "Creating /var/log/plexReport.log" /usr/bin/touch /var/log/plexReport.log -ln -s /config/config.yaml /etc/plexReport/config.yaml -ln -s /config/email_body.erb /etc/plexReport/email_body.erb - /bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler /usr/local/bin/bundle install From f85a0ec15197200248f5a933095f204f5a076e69 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 01:15:33 -0700 Subject: [PATCH 40/78] Update plexreport --- bin/plexreport | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/plexreport b/bin/plexreport index 6aae5da..ab4abfe 100755 --- a/bin/plexreport +++ b/bin/plexreport @@ -62,13 +62,13 @@ class PlexReport def initialize begin - $config = YAML.load_file('/etc/plexReport/config.yaml') + $config = YAML.load_file('/config/config.yaml') rescue Errno::ENOENT => e abort('Configuration file not found. Exiting...') end begin - $logger = Logger.new('/var/log/plexReport.log') + $logger = Logger.new('/config/plexReport.log') if $options[:verbose] $logger.level = Logger::DEBUG @@ -369,8 +369,8 @@ def main new_seasons = new_episodes[:seasons] new_episodes = new_episodes[:new] - YAML.load_file('/etc/plexReport/config.yaml') - template = ERB.new File.new("/etc/plexReport/email_body.erb").read, nil, "%" + YAML.load_file('/config/config.yaml') + template = ERB.new File.new("/config/email_body.erb").read, nil, "%" mail = MailReport.new($config, $options) if (movies.empty? && new_seasons.empty? && new_episodes.empty?) From a4a208d870df4531add97166d72608cae975210f Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 01:18:17 -0700 Subject: [PATCH 41/78] Update initial_setup.sh --- initial_setup.sh | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/initial_setup.sh b/initial_setup.sh index 8a46f19..24916b1 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -4,26 +4,22 @@ # PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/etc/plexReport' -PLEX_REPORT_EDIT='/config' +PLEX_REPORT_CONF='/config' /bin/echo "Creating plexreport library at /var/lib/plexReport" /bin/mkdir -p $PLEX_REPORT_LIB -/bin/echo "Creating plexreport conf directory at /etc/plexReport" -/bin/mkdir -p $PLEX_REPORT_CONF /bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" /bin/cp -r bin/* /usr/local/sbin /bin/echo "Moving plexreport libraries to /var/lib/plexreport" /bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexreport & /config" +/bin/echo "Moving email_body.erb to /config" /bin/cp -r etc/* $PLEX_REPORT_CONF -/bin/cp -r etc/* $PLEX_REPORT_EDIT -/bin/echo "Creating /etc/plexreport/config.yaml" -/usr/bin/touch /etc/plexReport/config.yaml -/bin/echo "Creating /var/log/plexReport.log" -/usr/bin/touch /var/log/plexReport.log +/bin/echo "Creating /config/config.yaml" +/usr/bin/touch /configt/config.yaml +/bin/echo "Creating /config/plexReport.log" +/usr/bin/touch /config/plexReport.log /bin/echo "Installing ruby gem dependency" /usr/bin/gem install bundler @@ -32,17 +28,4 @@ PLEX_REPORT_EDIT='/config' /bin/echo "Running /usr/local/sbin/plexreport-setup" /usr/local/sbin/plexreport-setup -#/bin/echo "What day do you want to run the script on? (Put 0 for Sunday, 1 for Monday, etc...)" -#read CRON_DAY -#/bin/echo "What hour should the script run? (00-23)" -#read CRON_HOUR -#/bin/echo "What minute in that hour should the script run? (00-59)" -#read CRON_MINUTE - -#/bin/echo "Adding /usr/local/sbin/plexreport to crontab" -#/usr/bin/crontab -l > mycron -#/bin/echo "$CRON_MINUTE $CRON_HOUR * * $CRON_DAY /usr/local/sbin/plexreport" >> mycron -#/usr/bin/crontab mycron -#/bin/rm mycron - -/bin/echo "Setup complete! Please create a cronjob from within unraid to call the plexReport on a schedule." +/bin/echo "Setup complete! Please create a cronjob from within unRAID to call the plexReport on a schedule." From b91c37af43ba2299cf814a89c224116fd55a5963 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 01:39:02 -0700 Subject: [PATCH 42/78] Update initial_setup.sh --- initial_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initial_setup.sh b/initial_setup.sh index 24916b1..5ea1f23 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -17,7 +17,7 @@ PLEX_REPORT_CONF='/config' /bin/cp -r etc/* $PLEX_REPORT_CONF /bin/echo "Creating /config/config.yaml" -/usr/bin/touch /configt/config.yaml +/usr/bin/touch /config/config.yaml /bin/echo "Creating /config/plexReport.log" /usr/bin/touch /config/plexReport.log From db7c34d9d75ee2687d3b91e81e9e1883fbb27237 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 01:42:59 -0700 Subject: [PATCH 43/78] Update plexreport-setup --- bin/plexreport-setup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/plexreport-setup b/bin/plexreport-setup index 814cbdd..90a5470 100755 --- a/bin/plexreport-setup +++ b/bin/plexreport-setup @@ -17,7 +17,7 @@ class Setup def initialize begin $config = Hash.new -# $config = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), '../etc/config.yaml') ) +# $config = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), '/config/config.yaml') ) rescue Errno::ENOENT => e abort('Configuration file not found. Exiting...') end @@ -78,7 +78,7 @@ class Setup end $config['mail']['username'] = ask("Enter your SMTP username/email address (For Gmail, use email address)") { |q| q.echo = true } - $config['mail']['password'] = ask("Enter your email password (This will only be saved in etc/config.yaml)") { |q| q.echo = "*" } + $config['mail']['password'] = ask("Enter your email password (This will only be saved in config.yaml)") { |q| q.echo = "*" } $config['mail']['from'] = ask("Display name of the sender (default: Plex Server)") { |q| q.echo = true } if $config['mail']['from'].empty? @@ -101,8 +101,8 @@ class Setup self.setPlexApiKey self.setEmail - File.open('/etc/plexReport/config.yaml', 'w') {|f| f.write $config.to_yaml } - puts "Writing information to /etc/plexReport/config.yaml" + File.open('/config/config.yaml', 'w') {|f| f.write $config.to_yaml } + puts "Writing information to /config/config.yaml" end end From 69e83fc7fdf17ec68bede5c289c96c79903fd5b8 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 20 Apr 2016 02:13:13 -0700 Subject: [PATCH 44/78] Update initial_setup.sh --- initial_setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/initial_setup.sh b/initial_setup.sh index 5ea1f23..4374a96 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -3,6 +3,10 @@ # and walks the user through the initial setup # +read -p "This script will delete any plexReport config that you may already have. Are you sure you want to run this? [Y/N] " -n 1 -r +echo # (optional) move to a new line +if [[ $REPLY =~ ^[Yy]$ ]] +then PLEX_REPORT_LIB='/var/lib/plexReport' PLEX_REPORT_CONF='/config' @@ -15,6 +19,7 @@ PLEX_REPORT_CONF='/config' /bin/cp -r lib/* $PLEX_REPORT_LIB /bin/echo "Moving email_body.erb to /config" /bin/cp -r etc/* $PLEX_REPORT_CONF +chmod +666 $PLEX_REPORT_CONF/email_body.erb /bin/echo "Creating /config/config.yaml" /usr/bin/touch /config/config.yaml @@ -29,3 +34,4 @@ PLEX_REPORT_CONF='/config' /usr/local/sbin/plexreport-setup /bin/echo "Setup complete! Please create a cronjob from within unRAID to call the plexReport on a schedule." +fi From dc35a7f88644618341dd2d740e5854a0183a59ff Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Thu, 21 Apr 2016 22:55:11 -0700 Subject: [PATCH 45/78] Update README.md --- README.md | 120 +++++++++++++----------------------------------------- 1 file changed, 29 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 551b60f..dd7dee7 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,16 @@ -plexWeeklyReport +plexReport ================ -Scripts to generate a weekly email of new additions to Plex. +A dockerized version of bstascavage's original plexReport (https://github.com/bstascavage/plexReport) ## Introduction -This script is meant to send out a summary of all new Plex entries to your server to all of your server's users. +This docker generates an email summary of new additions to Plex to send to your ursers ## Supported Platforms -* Debian -* Ubuntu 14.04 LTS -* Mac OSX +unRAID ## Supported Email Clients * Gmail -* Mozilla Thunderbird ## Supported Plex Agents * themoviedb @@ -22,105 +19,48 @@ This script is meant to send out a summary of all new Plex entries to your serve ## Prerequisites -The following are needed to run this script: +The following are needed to run this docker: -1. Ruby installed (at least version 1.9.3) and ruby-dev. -2. For OSX: make sure you have Ruby installed using RVM (This is needed to create a wrapper to weekly run the script through crontab) (see http://railsapps.github.io/installrubyonrails-mac.html. Follow the steps from "Prepare your computer" until "Rails installation options"). -3. themoviedb set as your Agent for your Movie section on your Plex server. +1. Plex. +2. themoviedb set as your Agent for your Movie section on your Plex server. 3. thetvdb.org set as your Agent for your TV section on your Plex server. -4. (Optional) A Gmail account to forward the email (Gmail is the only supported provider, so if you use another, YMMV). +4. A Gmail account to forward the email (Gmail is the only supported provider, so if you use another, YMMV). -## Installation (Linux) +## Installation (unRAID) -1. Clone this repo on your server: +Prefered installation method: From the Community Applications 'APPS' section in unRAID. +You can also install by adding the following template repository to unraid: +https://github.com/ninthwalker/docker-templates/ - `git clone https://github.com/bstascavage/plexReport.git` -2. Change to the plexReport directory -3. Run the initial_setup script: +After installing, run the following commands from the command line: - `./initial_setup.sh` +`docker exec -it plexReport bash` +`cd /opt/plexReport` +`./initial_setup.sh` -4. If you want to run your script with different commandline parameters, you'll need to edit the crontab. See here for reference: http://www.adminschoice.com/crontab-quick-reference - -## Installation (OS X) -Part 1: Install plexReport - -1. Clone this repo on your server: - - `git clone https://github.com/bstascavage/plexReport.git` -2. Change to the plexReport directory -3. Install the blunder gem (http://bundler.io/) +Follow Prompts - `gem install bundler` -4. Install the gem dependecies: +plexReport can be run with the following command from unraid: - `bundle install` -5. Setup the config file in `etc/config.yaml`. See `etc/config.yaml.example` and below for details -6. Run `bin/plexreport` to execute the script -It should work correctly - +`docker exec plexReport plexreport [-options]` -Part 2: Create Ruby Wrapper +You can now edit the `config.yaml` (and optionally `email_body.erb`) with your own settings in your appdata dir. +See `/config/config.yaml.example` and below for details. -Now to have the script run once a week through crontab, you have to create an RVM alias by doing the following steps: -(Note: You need an RVM alias because launchd, cron, and other process schedulers operate in discrete bash shell environments. Simply calling ruby from inside your launchd or cron script will not work; that will invoke the non-RVM ruby that OS X shipped with. Instead, you need an RVM alias, which will run your file through RVM's ruby, from inside launchd.) +To schedule the report to occur regulary setup a cron from within unraid: +Enter the following command in the unRAID shell. Replace the day/time with what you want: -1. Determine your ruby version by entering +`crontab -l | { cat; echo "30 11 * * 5 docker exec plexReport plexreport -n -d"; } | crontab -` - `which ruby` - this should results in: - `/Users/you/.rvm/rubies/ruby-2.2.0/bin/ruby` - ruby-2.2.0 is your ruby version - -2. Create a wrapper by entering +To keep the cronjob after a reboot, also add the line to your \boot\config\go file. - `rvm alias create plexReport ruby-2.2.0@plexReport` - Note: Replace ruby-2.2.0 with the version that you have determined in step 1 - -3. Test the wrapper by entering - - `$rvm_path/wrappers/plexReport/ruby /bin/plexReport.rb -t` - Note: Replace with the path leading to your plexReport directory - - It should run and exit properly (be patient it might take a few minutes). - -4. Next determine the absolute path to your wrapper. Just run - - `echo $rvm_path` - it should result in something like this /users/esw1187/.rvm/ - - Substitute '$rvm_path' in the wrapper call with the absolute rvm path obtaine above and run it again by entering - - `/users/ersw1187/.rvm/wrappers/plexReport/ruby /path_to/plexReport/bin/plexReport.rb` - -5. Create bash script to run the Rub code by doing the following: - - Create a file on your desktop named 'plexReport.sh' and open it with TextEdit +## email_body.erb - - Copy the following two lines in the file - `export LC_ALL=en_US.UTF-8` - `export LANG=en_US.UTF-8` - - - Add the wrapper call you just tested in step 4 to the file that you have just tested. E.g. - `/users/ersw1187/.rvm/wrappers/plexReport/ruby /path_to/plexReport/bin/plexReport` +This can be edited with CSS/HTML if you want to modify the look of the email. -6. Copy plexReport.sh to /user/local/bin directory - -7. Go to the /usr/local/bin directory and set the correct permissions by entering - `chmod u+x plexReport.sh` - -8. Add the following line to your crontab (sudo crontab -e) - - `15 11 * * 5 /usr/local/bin/plexReport.sh` - (This will run it every Friday at 11:15. To change the time, see crontab documentation: - http://www.adminschoice.com/crontab-quick-reference - -## Upgrading - -To upgrade your code, cd to your plexReport directory and run `./update.sh` - ## Config file -By default, the config file is located in `/etc/plexReport/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: +By default, the config file is located in `/config/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: ###### email `title` - Banner title for the email body. Required. @@ -153,7 +93,7 @@ By default, the config file is located in `/etc/plexReport/config.yaml`. If you ## Command-line Options -Once installed, you can run the script by simply running `plexreport`. If you need to reinstall or reconfigure the program, run `plexreport-setup`. All commandline options can be seen by running `plexReport --help` +Once installed, you can run the script by simply running `plexreport` from within the docker image container. If you need to reinstall or reconfigure the program, run `plexreport-setup`. All commandline options can be seen by running `plexreport --help` ##### Options: `-n, --no-plex-email` - Do not send emails to Plex friends. Can be used with the `recipients_email` and `recipients` config file option to customize email recipients. @@ -169,11 +109,9 @@ Once installed, you can run the script by simply running `plexreport`. If you n New Episodes: ![alt tag](http://i.imgur.com/hWzHl2x.png) - New Seasons: ![alt tag](http://i.imgur.com/sBy62Ty.png) - New Movies: ![alt tag](http://i.imgur.com/E3Q85uU.png) From a0ef143627af1f2710e05044d4d5e9e3707041ce Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Thu, 21 Apr 2016 22:58:28 -0700 Subject: [PATCH 46/78] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dd7dee7..f0c81ce 100644 --- a/README.md +++ b/README.md @@ -53,15 +53,15 @@ Enter the following command in the unRAID shell. Replace the day/time with what `crontab -l | { cat; echo "30 11 * * 5 docker exec plexReport plexreport -n -d"; } | crontab -` To keep the cronjob after a reboot, also add the line to your \boot\config\go file. - -## email_body.erb - -This can be edited with CSS/HTML if you want to modify the look of the email. -## Config file +## Config By default, the config file is located in `/config/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: +##### email_body.erb + +This file can be edited with CSS/HTML if you want to modify the look of the email. + ###### email `title` - Banner title for the email body. Required. From 372e7e60b279786939b253bd6c7d490f11bd7679 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Thu, 21 Apr 2016 23:00:01 -0700 Subject: [PATCH 47/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0c81ce..1c21002 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ To keep the cronjob after a reboot, also add the line to your \boot\config\go fi By default, the config file is located in `/config/config.yaml`. If you need to change any information for the program, or to add more optional config parameters, see below for the config file format: -##### email_body.erb +###### email_body.erb This file can be edited with CSS/HTML if you want to modify the look of the email. From 1aee415c75b0558b817c112d22eb47935a70dd6b Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Thu, 21 Apr 2016 23:01:50 -0700 Subject: [PATCH 48/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c21002..c4eb680 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A dockerized version of bstascavage's original plexReport (https://github.com/bs This docker generates an email summary of new additions to Plex to send to your ursers ## Supported Platforms -unRAID +* unRAID ## Supported Email Clients * Gmail From 98cedcaef0b34dea7308792e07f9bdc1547fb7f6 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Thu, 21 Apr 2016 23:12:36 -0700 Subject: [PATCH 49/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4eb680..2d849d9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The following are needed to run this docker: ## Installation (unRAID) -Prefered installation method: From the Community Applications 'APPS' section in unRAID. +Preferred installation method: From the Community Applications 'APPS' section in unRAID. You can also install by adding the following template repository to unraid: https://github.com/ninthwalker/docker-templates/ From 3e65c4288becfaeca49dd9d2ee48d82f4edf67aa Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Thu, 9 Jun 2016 20:59:04 -0700 Subject: [PATCH 50/78] Bug Fixes & Email Layout changes --- README.md | 11 ++++++++++- etc/email_body.erb | 8 ++++---- etc/email_schedule.cron | 2 ++ images/plex.png | Bin 20195 -> 4309 bytes initial_setup.sh | 30 +++++++++++++++++++----------- 5 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 etc/email_schedule.cron diff --git a/README.md b/README.md index 2d849d9..2be78ac 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,16 @@ plexReport can be run with the following command from unraid: You can now edit the `config.yaml` (and optionally `email_body.erb`) with your own settings in your appdata dir. See `/config/config.yaml.example` and below for details. -To schedule the report to occur regulary setup a cron from within unraid: +To schedule the report to occur regulary please use the new cron system for unRAID 6.x: + +Modify the "plexreport_schedule.cron" with the schedule that you would prefer. +This file is located in your docker appdata /config location. + +Then copy the "plexreport_schedule.cron" to /boot/config/plugins/dynamix. +Each time unraid is started it will load your plexreport_schedule. + +Optionally you can setup the cron the old way: + Enter the following command in the unRAID shell. Replace the day/time with what you want: `crontab -l | { cat; echo "30 11 * * 5 docker exec plexReport plexreport -n -d"; } | crontab -` diff --git a/etc/email_body.erb b/etc/email_body.erb index a9ff6a4..a5029b8 100644 --- a/etc/email_body.erb +++ b/etc/email_body.erb @@ -339,7 +339,7 @@ background: #CC0000 !important;
+

@@ -365,7 +365,7 @@ background: #CC0000 !important; <% new_episodes.each do |episode| %>
-

+
-
@@ -389,7 +389,7 @@ background: #CC0000 !important; <% new_seasons.each do |season| %>
+
-
@@ -413,7 +413,7 @@ background: #CC0000 !important; <% movies.each do |movie| %>
+
-
diff --git a/etc/email_schedule.cron b/etc/email_schedule.cron new file mode 100644 index 0000000..ec7b5f4 --- /dev/null +++ b/etc/email_schedule.cron @@ -0,0 +1,2 @@ +# Sends a weekly Plex Report email on Friday's at 10:30hrs +30 10 * * 5 docker exec plexReport plexreport -n -d &> /dev/null \ No newline at end of file diff --git a/images/plex.png b/images/plex.png index 4bc48f73fcf75631b9f843e8e7918b6b1aa9d446..61213e487706af83521a41115954e3d82f505bb7 100644 GIT binary patch literal 4309 zcmV;`5GwD9P)Tjv5WKqLE(jr*1tNr(gqQ>CYF3w{M|mW8 zfdDEvku0v9Jy$@%o9hDcDlVw;2#AD$A#alql1!3$ch^?W^z?LQLekTj2}!m;<}{U_ z>gvC{zxn^a{`#vL00jyZC{Un4fdU2o1{6xw)zu*(Au^gk2-)p+lgVT-7@C@z>gwuh zYHG^M%da@l(a|AWxZ>jC$&)AdTJ58cK6>`qX9IVSunbs|etRUjxw*S{?-uXT&`_Tq zH91Lrv(ZKp5JCV6#BCu0LfN$k68Nbik^qUZ#4E=-|NB#uJTZ}tk-HmK|uk1(iBBW5yM~5 zXfz&s%r^ArldWHFiMua?G+GcratZ;{h;VQS5)c<0titr-whp!diw*5a3;N&ht=H=r zUuBpzYu4h$i)9F(ot@2-OxV@l-tPB%6cG`Tl9IA#&z_2k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fAi2*RE_r|UT%9%N0$KKJM&}M(>VR2NOjj(_9Acz~ zOVB%KN#=g`Sc>^rye6YCum`dywbf7nY9eOFm%AK=nF*y#+wcC#P0Xx>_FM6&gz7*d z4RH=?6sbHwM?7+WqzXf#42j6Q7>-VIwDrxP_*B9!S-c2i$S4MywsAOMSB-4)5cDo# iL&WXotXZyIiTJ<2j Date: Fri, 10 Jun 2016 11:12:36 -0700 Subject: [PATCH 51/78] File name change --- etc/{email_schedule.cron => plexreport_schedule.cron} | 2 +- initial_setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename etc/{email_schedule.cron => plexreport_schedule.cron} (99%) diff --git a/etc/email_schedule.cron b/etc/plexreport_schedule.cron similarity index 99% rename from etc/email_schedule.cron rename to etc/plexreport_schedule.cron index ec7b5f4..f1a6553 100644 --- a/etc/email_schedule.cron +++ b/etc/plexreport_schedule.cron @@ -1,2 +1,2 @@ # Sends a weekly Plex Report email on Friday's at 10:30hrs -30 10 * * 5 docker exec plexReport plexreport -n -d &> /dev/null \ No newline at end of file +30 10 * * 5 docker exec plexReport plexreport -n -d &> /dev/null diff --git a/initial_setup.sh b/initial_setup.sh index 0b4b4a8..f16f262 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -26,7 +26,7 @@ PLEX_REPORT_CONF='/config' #/bin/echo "Moving email_body.erb to /config" /bin/cp -r etc/* $PLEX_REPORT_CONF chmod +666 $PLEX_REPORT_CONF/email_body.erb -chmod +666 $PLEX_REPORT_CONF/email_schedule.cron +chmod +666 $PLEX_REPORT_CONF/plexreport_schedule.cron # /bin/echo "Creating /config/config.yaml" /usr/bin/touch /config/config.yaml From 32832516b81925add92ca58529edb745ffce1ae5 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Sat, 11 Jun 2016 22:55:51 -0700 Subject: [PATCH 52/78] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 3dbed12..57ffb9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport +# . # Add firstrun.sh to execute during container startup # ADD firstrun.sh /etc/my_init.d/firstrun.sh # RUN chmod +x /etc/my_init.d/firstrun.sh From a385d814e98ab40fa2582cb8b9d6c7f702ba795c Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Sat, 11 Jun 2016 23:46:53 -0700 Subject: [PATCH 53/78] Downgrade Bundler version --- Dockerfile | 1 + initial_setup.sh | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3dbed12..57ffb9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,7 @@ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport +# . # Add firstrun.sh to execute during container startup # ADD firstrun.sh /etc/my_init.d/firstrun.sh # RUN chmod +x /etc/my_init.d/firstrun.sh diff --git a/initial_setup.sh b/initial_setup.sh index f16f262..9ca78f2 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -34,12 +34,11 @@ chmod +666 $PLEX_REPORT_CONF/plexreport_schedule.cron /usr/bin/touch /config/plexReport.log # /bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler # fix world-writable bundle error -chmod +t -R ~/.bundle/cache +/usr/bin/gem install bundler -v 1.12.3 /usr/local/bin/bundle install # /bin/echo "Running /usr/local/sbin/plexreport-setup" /usr/local/sbin/plexreport-setup -/bin/echo "Setup complete! Please create a cronjob from within unRAID to call the plexReport on a schedule." +/bin/echo "Setup complete! Please see directions for running this on a schedule." fi From d2130705d84fd4286ddba239445fdc65352724b7 Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Mon, 13 Jun 2016 12:05:49 -0700 Subject: [PATCH 54/78] Updates and fixes --- Dockerfile | 7 +------ etc/email_body.erb | 2 +- etc/plexreport_schedule.cron | 3 ++- firstrun.sh | 23 ----------------------- initial_setup.sh | 2 +- update.sh | 20 -------------------- 6 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 firstrun.sh delete mode 100755 update.sh diff --git a/Dockerfile b/Dockerfile index 57ffb9d..29f9c0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:0.9.15 +FROM phusion/baseimage:0.9.18 MAINTAINER ninthwalker # Set correct environment variables @@ -29,8 +29,3 @@ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport - -# . -# Add firstrun.sh to execute during container startup -# ADD firstrun.sh /etc/my_init.d/firstrun.sh -# RUN chmod +x /etc/my_init.d/firstrun.sh diff --git a/etc/email_body.erb b/etc/email_body.erb index a5029b8..01a221b 100644 --- a/etc/email_body.erb +++ b/etc/email_body.erb @@ -389,7 +389,7 @@ background: #CC0000 !important; <% new_seasons.each do |season| %>
+
-
diff --git a/etc/plexreport_schedule.cron b/etc/plexreport_schedule.cron index f1a6553..eb7ba07 100644 --- a/etc/plexreport_schedule.cron +++ b/etc/plexreport_schedule.cron @@ -1,2 +1,3 @@ -# Sends a weekly Plex Report email on Friday's at 10:30hrs +# Sends a weekly Plex Report email on Friday's at 10:30hrs. See http://www.adminschoice.com/crontab-quick-reference for cron help. 30 10 * * 5 docker exec plexReport plexreport -n -d &> /dev/null + diff --git a/firstrun.sh b/firstrun.sh deleted file mode 100644 index 201f6cb..0000000 --- a/firstrun.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Check if config exists. If not, copy in the sample config -if [ -f /config/config.yaml ]; then - echo "Using existing config file." - ln -s /config/config.yaml /etc/plexReport/config.yaml -else - echo "Creating config from template." - mv /opt/plexReport/etc/config.yaml.example /config/config.yaml - chown nobody:users /config/config.yaml - ln -s /config/config.yaml /etc/plexReport/config.yaml -fi - -# Check if email_body.erb exists. If not, copy the original -if [ -f /config/email_body.erb ]; then - echo "Using existing email_body file." - ln -s /config/email_body.erb /etc/plexReport/email_body.erb -else - echo "Creating email_body from template." - cp /opt/plexReport/etc/email_body.erb /config/email_body.erb - chown nobody:users /config/email_body.erb - ln -s /config/email_body.erb /etc/plexReport/email_body.erb -fi diff --git a/initial_setup.sh b/initial_setup.sh index 9ca78f2..5da0435 100755 --- a/initial_setup.sh +++ b/initial_setup.sh @@ -40,5 +40,5 @@ chmod +666 $PLEX_REPORT_CONF/plexreport_schedule.cron # /bin/echo "Running /usr/local/sbin/plexreport-setup" /usr/local/sbin/plexreport-setup -/bin/echo "Setup complete! Please see directions for running this on a schedule." +/bin/echo "Setup complete! Please read directions for running this on a schedule." fi diff --git a/update.sh b/update.sh deleted file mode 100755 index 0e21681..0000000 --- a/update.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Bash script to pull the newest code from Github and copy it to the correct locations -PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/etc/plexReport' - -/bin/echo "Grabbing newest code from https://github.com/ninthwalker/plexReport" -/usr/bin/git pull - -/bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" -/bin/cp -r bin/* /usr/local/sbin -/bin/echo "Moving plexreport libraries to /var/lib/plexReport" -/bin/cp -r lib/* $PLEX_REPORT_LIB -/bin/echo "Moving email_body.erb to /etc/plexReport" -/bin/cp -r etc/* $PLEX_REPORT_CONF - -/bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler -/usr/local/bin/bundle install - -/bin/echo "Upgrade complete" From 1d10f1156238a8026cb18c5b1c91949f6e5e53a9 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Mon, 13 Jun 2016 13:55:37 -0700 Subject: [PATCH 55/78] Update README.md --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2be78ac..37bc4f0 100644 --- a/README.md +++ b/README.md @@ -49,19 +49,12 @@ See `/config/config.yaml.example` and below for details. To schedule the report to occur regulary please use the new cron system for unRAID 6.x: -Modify the "plexreport_schedule.cron" with the schedule that you would prefer. -This file is located in your docker appdata /config location. +Edit the "plexreport_schedule.cron" file found in the plexreport appdata folder with your own time/date. +Copy that file to the following location. Each time unraid is started it will load your plexreport_schedule. +`/boot/config/plugins/dynamix/` -Then copy the "plexreport_schedule.cron" to /boot/config/plugins/dynamix. -Each time unraid is started it will load your plexreport_schedule. - -Optionally you can setup the cron the old way: - -Enter the following command in the unRAID shell. Replace the day/time with what you want: - -`crontab -l | { cat; echo "30 11 * * 5 docker exec plexReport plexreport -n -d"; } | crontab -` - -To keep the cronjob after a reboot, also add the line to your \boot\config\go file. +To have it added immediately without restarting unRAID, at the command prompt type `update_cron` +See this page for help creating a time/date in cron: http://abunchofutils.com/u/computing/cron-format-helper/ ## Config From 696f0e164778452b5c3c832014d9da5d87269399 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Mon, 13 Jun 2016 13:57:05 -0700 Subject: [PATCH 56/78] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37bc4f0..18dd13b 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,11 @@ To schedule the report to occur regulary please use the new cron system for unRA Edit the "plexreport_schedule.cron" file found in the plexreport appdata folder with your own time/date. Copy that file to the following location. Each time unraid is started it will load your plexreport_schedule. + `/boot/config/plugins/dynamix/` -To have it added immediately without restarting unRAID, at the command prompt type `update_cron` +To have it added immediately without restarting unRAID, at the command prompt type `update_cron`. + See this page for help creating a time/date in cron: http://abunchofutils.com/u/computing/cron-format-helper/ ## Config From 606c9ba62ec453d16fd8f48e2d43fe5f140fc4bd Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Fri, 4 Nov 2016 13:13:01 -0700 Subject: [PATCH 57/78] Code Refinements --- .gitignore | 3 - Dockerfile | 15 +++-- README.md | 17 +++-- initial_setup.sh | 44 ------------- root/initial_setup.sh | 14 ++++ root/opt/config/config.yaml | 1 + {etc => root/opt/config}/config.yaml.example | 0 {etc => root/opt/config}/email_body.erb | 64 ++++++++++--------- root/opt/config/plexReport.log | 1 + .../opt/config}/plexreport_schedule.cron | 2 +- Gemfile => root/opt/gem/Gemfile | 0 Gemfile.lock => root/opt/gem/Gemfile.lock | 0 {bin => root/usr/local/sbin}/plexreport | 0 {bin => root/usr/local/sbin}/plexreport-setup | 0 .../var/lib/plexReport}/locales/de.yml | 2 +- .../var/lib/plexReport}/locales/en.yml | 2 +- .../var/lib/plexReport}/locales/fr.yml | 2 +- .../var/lib/plexReport}/mailReport.rb | 0 {lib => root/var/lib/plexReport}/omdb.rb | 0 {lib => root/var/lib/plexReport}/plex.rb | 0 {lib => root/var/lib/plexReport}/plexTv.rb | 0 .../var/lib/plexReport}/themoviedb.rb | 0 {lib => root/var/lib/plexReport}/thetvdb.rb | 0 23 files changed, 71 insertions(+), 96 deletions(-) delete mode 100644 .gitignore delete mode 100755 initial_setup.sh create mode 100644 root/initial_setup.sh create mode 100644 root/opt/config/config.yaml rename {etc => root/opt/config}/config.yaml.example (100%) rename {etc => root/opt/config}/email_body.erb (99%) create mode 100644 root/opt/config/plexReport.log rename {etc => root/opt/config}/plexreport_schedule.cron (67%) rename Gemfile => root/opt/gem/Gemfile (100%) rename Gemfile.lock => root/opt/gem/Gemfile.lock (100%) rename {bin => root/usr/local/sbin}/plexreport (100%) mode change 100755 => 100644 rename {bin => root/usr/local/sbin}/plexreport-setup (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/locales/de.yml (95%) rename {lib => root/var/lib/plexReport}/locales/en.yml (97%) rename {lib => root/var/lib/plexReport}/locales/fr.yml (96%) rename {lib => root/var/lib/plexReport}/mailReport.rb (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/omdb.rb (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/plex.rb (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/plexTv.rb (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/themoviedb.rb (100%) mode change 100755 => 100644 rename {lib => root/var/lib/plexReport}/thetvdb.rb (100%) mode change 100755 => 100644 diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cae2026..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -etc/config.yaml -cron/ -plexReport.log diff --git a/Dockerfile b/Dockerfile index 29f9c0e..687f165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:0.9.18 +FROM phusion/baseimage:0.9.19 MAINTAINER ninthwalker # Set correct environment variables @@ -11,15 +11,15 @@ ENV LANGUAGE en_US.UTF-8 # Use baseimage-docker's init system CMD ["/sbin/my_init"] +#copy plexReport files +COPY root/ / + # Configure user nobody to match unRAID's settings RUN \ usermod -u 99 nobody && \ usermod -g 100 nobody && \ usermod -d /home nobody && \ chown -R nobody:users /home - -# Disable SSH -RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ @@ -28,4 +28,9 @@ apt-get update -q && \ apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ -git clone https://github.com/ninthwalker/plexReport.git /opt/plexReport +cd /opt/gem && \ +gem install bundler -v 1.12.3 && \ +bundle install + +VOLUME /config + diff --git a/README.md b/README.md index 18dd13b..8277ee8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A dockerized version of bstascavage's original plexReport (https://github.com/bs This docker generates an email summary of new additions to Plex to send to your ursers ## Supported Platforms -* unRAID +* unRAID, Other Linux ## Supported Email Clients * Gmail @@ -33,12 +33,9 @@ You can also install by adding the following template repository to unraid: https://github.com/ninthwalker/docker-templates/ After installing, run the following commands from the command line: - -`docker exec -it plexReport bash` -`cd /opt/plexReport` -`./initial_setup.sh` - -Follow Prompts +(This initial_setup only has to be done once. Reinstalls of the docker do not require it) +`docker exec -it plexReport ./initial_setup.sh` +Follow Prompts. plexReport can be run with the following command from unraid: @@ -47,7 +44,7 @@ plexReport can be run with the following command from unraid: You can now edit the `config.yaml` (and optionally `email_body.erb`) with your own settings in your appdata dir. See `/config/config.yaml.example` and below for details. -To schedule the report to occur regulary please use the new cron system for unRAID 6.x: +To schedule the report to occur regulary please use the new cron system for unRAID 6: Edit the "plexreport_schedule.cron" file found in the plexreport appdata folder with your own time/date. Copy that file to the following location. Each time unraid is started it will load your plexreport_schedule. @@ -97,7 +94,9 @@ This file can be edited with CSS/HTML if you want to modify the look of the emai ## Command-line Options -Once installed, you can run the script by simply running `plexreport` from within the docker image container. If you need to reinstall or reconfigure the program, run `plexreport-setup`. All commandline options can be seen by running `plexreport --help` +Once installed, you can run the script by simply running `plexreport` from within the docker image container. + +If you need to reconfigure the program configs, first delete the existing config files and rerun '. /initial_setup.sh`. All commandline options can be seen by running `plexreport --help` ##### Options: `-n, --no-plex-email` - Do not send emails to Plex friends. Can be used with the `recipients_email` and `recipients` config file option to customize email recipients. diff --git a/initial_setup.sh b/initial_setup.sh deleted file mode 100755 index 5da0435..0000000 --- a/initial_setup.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# Bash script that copies plexreport files to various directories -# and walks the user through the initial setup -# - -/bin/echo "This script will create a backup if a config exists, and then delete any plexReport config that you may already have" -read -p "Are you sure you want to run this? [Y/N] " -n 1 -r -echo # move to a new line -if [[ $REPLY =~ ^[Yy]$ ]] -then -# create backups -/bin/mkdir /config/backup -/bin/cp /config/* /config/backup/ -/bin/echo "Backup complete. Find at /config/backup" - -PLEX_REPORT_LIB='/var/lib/plexReport' -PLEX_REPORT_CONF='/config' - -# /bin/echo "Creating plexreport library at /var/lib/plexReport" -/bin/mkdir -p $PLEX_REPORT_LIB - -# /bin/echo "Moving plexreport and plexreport-setup to /usr/local/sbin" -/bin/cp -r bin/* /usr/local/sbin -#/bin/echo "Moving plexreport libraries to /var/lib/plexreport" -/bin/cp -r lib/* $PLEX_REPORT_LIB -#/bin/echo "Moving email_body.erb to /config" -/bin/cp -r etc/* $PLEX_REPORT_CONF -chmod +666 $PLEX_REPORT_CONF/email_body.erb -chmod +666 $PLEX_REPORT_CONF/plexreport_schedule.cron - -# /bin/echo "Creating /config/config.yaml" -/usr/bin/touch /config/config.yaml -# /bin/echo "Creating /config/plexReport.log" -/usr/bin/touch /config/plexReport.log - -# /bin/echo "Installing ruby gem dependency" -/usr/bin/gem install bundler -v 1.12.3 -/usr/local/bin/bundle install - -# /bin/echo "Running /usr/local/sbin/plexreport-setup" -/usr/local/sbin/plexreport-setup - -/bin/echo "Setup complete! Please read directions for running this on a schedule." -fi diff --git a/root/initial_setup.sh b/root/initial_setup.sh new file mode 100644 index 0000000..e5aacda --- /dev/null +++ b/root/initial_setup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +#walks the user through the initial setup +echo + +if [ -f /config/config.yaml ]; then + echo "Config files detected. Using existing config" + echo # move to a new line +else + # begin initial setup + cp /opt/config/* /config/ + chmod -R 666 /config/* + /usr/local/sbin/plexreport-setup + echo "Setup complete! Please read directions for running this on a schedule." +fi diff --git a/root/opt/config/config.yaml b/root/opt/config/config.yaml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/opt/config/config.yaml @@ -0,0 +1 @@ + diff --git a/etc/config.yaml.example b/root/opt/config/config.yaml.example similarity index 100% rename from etc/config.yaml.example rename to root/opt/config/config.yaml.example diff --git a/etc/email_body.erb b/root/opt/config/email_body.erb similarity index 99% rename from etc/email_body.erb rename to root/opt/config/email_body.erb index 01a221b..bdccf2a 100644 --- a/etc/email_body.erb +++ b/root/opt/config/email_body.erb @@ -355,6 +355,38 @@ background: #CC0000 !important;

<%= $config['email']['title'] %>

<%= I18n.l Time.now.to_date, format: :long %>


+ + <% if movies != [] %> +

<%= I18n.t :new_movies %>:

+ + <% movies.each do |movie| %> +
+ +
+ + +
+
+ + + +
+
<%= movie[:title] %> (<%= movie[:date] %>)
+

<%= movie[:tagline] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

+ <% end %> +

<%= movie[:synopsis] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

+ <% else %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

+ <% end %> +
@@ -383,7 +415,7 @@ background: #CC0000 !important; <% end %> <% end %> -
+

<% if new_seasons != [] %>

<%= I18n.t :new_seasons %>:

<% new_seasons.each do |season| %> @@ -407,36 +439,6 @@ background: #CC0000 !important; <% end %>
- <% if movies != [] %> -

<%= I18n.t :new_movies %>:

- - <% movies.each do |movie| %> -
+ <% end %> + <% end %> + +

<% if new_episodes != [] %>

<%= I18n.t :new_episodes %>:

- -
- - -
-
- - - -
-
<%= movie[:title] %> (<%= movie[:date] %>)
-

<%= movie[:tagline] %>

- <% if $options[:detail_email] %> -

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

- <% end %> -

<%= movie[:synopsis] %>

- <% if $options[:detail_email] %> -

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

- <% else %> -

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

- <% end %> -
- <% end %> - <% end %> -

<%= I18n.t :thanks_sentence %>

diff --git a/root/opt/config/plexReport.log b/root/opt/config/plexReport.log new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/root/opt/config/plexReport.log @@ -0,0 +1 @@ + diff --git a/etc/plexreport_schedule.cron b/root/opt/config/plexreport_schedule.cron similarity index 67% rename from etc/plexreport_schedule.cron rename to root/opt/config/plexreport_schedule.cron index eb7ba07..598dde0 100644 --- a/etc/plexreport_schedule.cron +++ b/root/opt/config/plexreport_schedule.cron @@ -1,3 +1,3 @@ # Sends a weekly Plex Report email on Friday's at 10:30hrs. See http://www.adminschoice.com/crontab-quick-reference for cron help. -30 10 * * 5 docker exec plexReport plexreport -n -d &> /dev/null +30 10 * * 5 docker exec plexReport plexreport &> /dev/null diff --git a/Gemfile b/root/opt/gem/Gemfile similarity index 100% rename from Gemfile rename to root/opt/gem/Gemfile diff --git a/Gemfile.lock b/root/opt/gem/Gemfile.lock similarity index 100% rename from Gemfile.lock rename to root/opt/gem/Gemfile.lock diff --git a/bin/plexreport b/root/usr/local/sbin/plexreport old mode 100755 new mode 100644 similarity index 100% rename from bin/plexreport rename to root/usr/local/sbin/plexreport diff --git a/bin/plexreport-setup b/root/usr/local/sbin/plexreport-setup old mode 100755 new mode 100644 similarity index 100% rename from bin/plexreport-setup rename to root/usr/local/sbin/plexreport-setup diff --git a/lib/locales/de.yml b/root/var/lib/plexReport/locales/de.yml similarity index 95% rename from lib/locales/de.yml rename to root/var/lib/plexReport/locales/de.yml index 752564d..9e55b0a 100644 --- a/lib/locales/de.yml +++ b/root/var/lib/plexReport/locales/de.yml @@ -58,7 +58,7 @@ de: director: "Regie" from: "für" genre: "Genre" - help_page_sentence: "Ein Problem? Diese Seite gefällt Ihnen? Sie möchten helfen? Dann schauen Sie doch einmal auf meiner github-Seite vorbei!" + help_page_sentence: "Ein Problem? Diese Seite gefällt Ihnen? Sie möchten helfen? Dann schauen Sie doch einmal auf meiner github-Seite vorbei!" imdb_rating: "IMDB-Rating" minutes: "Minuten" network: "Sender" diff --git a/lib/locales/en.yml b/root/var/lib/plexReport/locales/en.yml similarity index 97% rename from lib/locales/en.yml rename to root/var/lib/plexReport/locales/en.yml index 42561fe..08fe657 100644 --- a/lib/locales/en.yml +++ b/root/var/lib/plexReport/locales/en.yml @@ -58,7 +58,7 @@ en: director: "Director" from: "from" genre: "Genre" - help_page_sentence: "Have an issue? Like what you see? Want to help? Then please check out my github page" + help_page_sentence: "Have an issue? Like what you see? Want to help? Then please check out my github page" imdb_rating: "IMDB Rating" minutes: "minutes" network: "Network" diff --git a/lib/locales/fr.yml b/root/var/lib/plexReport/locales/fr.yml similarity index 96% rename from lib/locales/fr.yml rename to root/var/lib/plexReport/locales/fr.yml index 226ecfd..00e1db7 100644 --- a/lib/locales/fr.yml +++ b/root/var/lib/plexReport/locales/fr.yml @@ -58,7 +58,7 @@ fr: director: "Réalisateur" from: "pour" genre: "Genre" - help_page_sentence: "Vous avez un problème ? Vous aimez ? Vous voulez aider ? Venez visiter la page github du projet" + help_page_sentence: "Vous avez un problème ? Vous aimez ? Vous voulez aider ? Venez visiter la page github du projet" imdb_rating: "Note IMDB" minutes: "minutes" network: "Chaine" diff --git a/lib/mailReport.rb b/root/var/lib/plexReport/mailReport.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/mailReport.rb rename to root/var/lib/plexReport/mailReport.rb diff --git a/lib/omdb.rb b/root/var/lib/plexReport/omdb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/omdb.rb rename to root/var/lib/plexReport/omdb.rb diff --git a/lib/plex.rb b/root/var/lib/plexReport/plex.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/plex.rb rename to root/var/lib/plexReport/plex.rb diff --git a/lib/plexTv.rb b/root/var/lib/plexReport/plexTv.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/plexTv.rb rename to root/var/lib/plexReport/plexTv.rb diff --git a/lib/themoviedb.rb b/root/var/lib/plexReport/themoviedb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/themoviedb.rb rename to root/var/lib/plexReport/themoviedb.rb diff --git a/lib/thetvdb.rb b/root/var/lib/plexReport/thetvdb.rb old mode 100755 new mode 100644 similarity index 100% rename from lib/thetvdb.rb rename to root/var/lib/plexReport/thetvdb.rb From 4e656d35be5b15e6a2ff69186490de04e6160210 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Fri, 4 Nov 2016 13:51:52 -0700 Subject: [PATCH 58/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 687f165..247e150 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:0.9.19 +FROM phusion/baseimage:0.9.18 MAINTAINER ninthwalker # Set correct environment variables From 3068542a3295968532b1c3cc302e5a23a5cd9a8d Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Fri, 4 Nov 2016 14:20:28 -0700 Subject: [PATCH 59/78] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8277ee8..cb47a11 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ https://github.com/ninthwalker/docker-templates/ After installing, run the following commands from the command line: (This initial_setup only has to be done once. Reinstalls of the docker do not require it) -`docker exec -it plexReport ./initial_setup.sh` + +`docker exec -it plexReport ./initial_setup.sh' + Follow Prompts. plexReport can be run with the following command from unraid: From 563555f29f554cc6fafef2e0501f010831425ca1 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Fri, 4 Nov 2016 14:21:01 -0700 Subject: [PATCH 60/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb47a11..5128ff2 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ https://github.com/ninthwalker/docker-templates/ After installing, run the following commands from the command line: (This initial_setup only has to be done once. Reinstalls of the docker do not require it) -`docker exec -it plexReport ./initial_setup.sh' +`docker exec -it plexReport ./initial_setup.sh` Follow Prompts. From 7b5d4ede869a8dcea7e6ef86033877f2afb8603b Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Fri, 4 Nov 2016 14:25:23 -0700 Subject: [PATCH 61/78] Fix Executable --- root/initial_setup.sh | 0 root/usr/local/sbin/plexreport-setup | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 root/initial_setup.sh mode change 100644 => 100755 root/usr/local/sbin/plexreport-setup diff --git a/root/initial_setup.sh b/root/initial_setup.sh old mode 100644 new mode 100755 diff --git a/root/usr/local/sbin/plexreport-setup b/root/usr/local/sbin/plexreport-setup old mode 100644 new mode 100755 From a8efbaa1e1a136348ff8781ebedb9bc18b50a570 Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Fri, 4 Nov 2016 14:38:03 -0700 Subject: [PATCH 62/78] Fix Executable --- root/usr/local/sbin/plexreport | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 root/usr/local/sbin/plexreport diff --git a/root/usr/local/sbin/plexreport b/root/usr/local/sbin/plexreport old mode 100644 new mode 100755 From bbd39d666e723830b6add6e05174af65416e27b7 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Fri, 4 Nov 2016 14:41:26 -0700 Subject: [PATCH 63/78] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5128ff2..f275b0c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ plexReport A dockerized version of bstascavage's original plexReport (https://github.com/bstascavage/plexReport) ## Introduction -This docker generates an email summary of new additions to Plex to send to your ursers +This docker generates an email summary of new additions to Plex to send to your users ## Supported Platforms * unRAID, Other Linux From a1ef9171dfabee8a5413ca12cab17cfb64af0582 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Tue, 7 Mar 2017 18:36:19 -0800 Subject: [PATCH 64/78] Update plexreport --- root/usr/local/sbin/plexreport | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/root/usr/local/sbin/plexreport b/root/usr/local/sbin/plexreport index ab4abfe..4c3ae2e 100755 --- a/root/usr/local/sbin/plexreport +++ b/root/usr/local/sbin/plexreport @@ -380,6 +380,10 @@ def main mail.sendMail(template.result(binding)) + output = File.new("/config/plexreport.html","w") + output << template.result(binding) + output.close + $logger.info("Script complete. Ran in #{Time.now - startTime} seconds") end main() From 564bb92ef01b4ff15a4834e4372bca717f6c833f Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 11:09:53 -0800 Subject: [PATCH 65/78] Update plexreport --- root/usr/local/sbin/plexreport | 1 + 1 file changed, 1 insertion(+) diff --git a/root/usr/local/sbin/plexreport b/root/usr/local/sbin/plexreport index 4c3ae2e..1122489 100755 --- a/root/usr/local/sbin/plexreport +++ b/root/usr/local/sbin/plexreport @@ -380,6 +380,7 @@ def main mail.sendMail(template.result(binding)) + rm -f "/config/plexreport.html" output = File.new("/config/plexreport.html","w") output << template.result(binding) output.close From fd838deb63640a80861bee9ad95f537f3d6f11d9 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 11:30:35 -0800 Subject: [PATCH 66/78] Update plexreport --- root/usr/local/sbin/plexreport | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/usr/local/sbin/plexreport b/root/usr/local/sbin/plexreport index 1122489..e75e684 100755 --- a/root/usr/local/sbin/plexreport +++ b/root/usr/local/sbin/plexreport @@ -371,6 +371,7 @@ def main YAML.load_file('/config/config.yaml') template = ERB.new File.new("/config/email_body.erb").read, nil, "%" + webtemplate = ERB.new File.new("/config/web_email_body.erb").read, nil, "%" mail = MailReport.new($config, $options) if (movies.empty? && new_seasons.empty? && new_episodes.empty?) @@ -380,9 +381,8 @@ def main mail.sendMail(template.result(binding)) - rm -f "/config/plexreport.html" output = File.new("/config/plexreport.html","w") - output << template.result(binding) + output << webtemplate.result(binding) output.close $logger.info("Script complete. Ran in #{Time.now - startTime} seconds") From 6fa3fd640bab8c719cfa530255986a3edec49732 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 11:31:38 -0800 Subject: [PATCH 67/78] Create web_email_body.erb --- root/opt/config/web_email_body.erb | 458 +++++++++++++++++++++++++++++ 1 file changed, 458 insertions(+) create mode 100644 root/opt/config/web_email_body.erb diff --git a/root/opt/config/web_email_body.erb b/root/opt/config/web_email_body.erb new file mode 100644 index 0000000..bdccf2a --- /dev/null +++ b/root/opt/config/web_email_body.erb @@ -0,0 +1,458 @@ + + + + + + + + + +
+
+ + +
+
+ + +
+ + + + +
+

+ +
+
+
+ + + + + <% new_episodes.each do |episode| %> +
+ +
+

<%= $config['email']['title'] %>

+

<%= I18n.l Time.now.to_date, format: :long %>

+
+ + <% if movies != [] %> +

<%= I18n.t :new_movies %>:

+ + <% movies.each do |movie| %> +
+ +
+ + +
+
+ + + +
+
<%= movie[:title] %> (<%= movie[:date] %>)
+

<%= movie[:tagline] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :genre %>: <%= movie[:genre] %>
<%= I18n.t :director %>: <%= movie[:director] %>

<%= I18n.t :cast %>: <%= movie[:actors] %>

+ <% end %> +

<%= movie[:synopsis] %>

+ <% if $options[:detail_email] %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>
<%= I18n.t :release_date %>: <%= movie[:released] %>

<%= I18n.t :rating %>: <%= movie[:rating] %>

<%= I18n.t :imdb_rating %>: <%= movie[:imdb_rating] %>/10 <%= I18n.t :from %> <%= movie[:imdb_votes] %> <%= I18n.t :users %>

+ <% else %> +

<%= I18n.t :runtime %>: <%= movie[:runtime] %> <%= I18n.t :minutes %>

+ <% end %> +
+ +
+ <% end %> + <% end %> + +

+ <% if new_episodes != [] %> +

<%= I18n.t :new_episodes %>:

+
+ +
+ + +
+
+ + + +
+
<%= episode[:series_name] %>
+

<%= episode[:episode_number] %> - <%= episode[:title] %>

+

<%= episode[:synopsis] %>

+

<%= I18n.t :network %>: <%= episode[:network] %>

+

<%= I18n.t :air_date %>: <%= episode[:airdate] %>

+
+ <% end %> + <% end %> + +

+ <% if new_seasons != [] %> +

<%= I18n.t :new_seasons %>:

+ <% new_seasons.each do |season| %> +
+ +
+ + +
+
+ + + +
+
<%= season[:series_name] %>
+

<%= I18n.t :seasons, count: season[:season].length %><%= season[:season].min %>-<%= season[:season].max %>

+

<%= season[:synopsis] %>

+

<%= I18n.t :network %>: <%= season[:network] %>

+
+
+ <% end %> + <% end %> + +
+ + +
+
+

<%= I18n.t :thanks_sentence %>

+
+
+
+ + + From 642d3250bc6e1a2439722795bc84900cb6f75122 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 11:34:03 -0800 Subject: [PATCH 68/78] Update plexreport-setup --- root/usr/local/sbin/plexreport-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/usr/local/sbin/plexreport-setup b/root/usr/local/sbin/plexreport-setup index 90a5470..e196ec3 100755 --- a/root/usr/local/sbin/plexreport-setup +++ b/root/usr/local/sbin/plexreport-setup @@ -102,7 +102,7 @@ class Setup self.setEmail File.open('/config/config.yaml', 'w') {|f| f.write $config.to_yaml } - puts "Writing information to /config/config.yaml" + puts "Writing information to config.yaml" end end From 974159d6379b270d5bc886b824f65232158b3c15 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 12:22:58 -0800 Subject: [PATCH 69/78] Create add_new_file.sh --- root/add_new_file.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 root/add_new_file.sh diff --git a/root/add_new_file.sh b/root/add_new_file.sh new file mode 100644 index 0000000..a26ecf5 --- /dev/null +++ b/root/add_new_file.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Added to check if new web_email_body.erb file exists, if not, add. +if [ -f /config/web_email_body.erb ]; then + echo # new line, do nothing +else + # copy new file + cp /opt/config/web_email_body.erb /config/ + chmod -R 666 /config/web_email_body.erb +fi From d30b3f92cfd1582aa79dab5b258201ba82fee006 Mon Sep 17 00:00:00 2001 From: Brent Allen Date: Wed, 8 Mar 2017 12:42:08 -0800 Subject: [PATCH 70/78] Add new web file --- root/add_new_file.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 root/add_new_file.sh diff --git a/root/add_new_file.sh b/root/add_new_file.sh old mode 100644 new mode 100755 From d70ca69095ccb384412ee43c077d5fbbb272ce5d Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 12:44:10 -0800 Subject: [PATCH 71/78] Update Dockerfile --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 247e150..945afc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,8 @@ COPY root/ / usermod -u 99 nobody && \ usermod -g 100 nobody && \ usermod -d /home nobody && \ - chown -R nobody:users /home + chown -R nobody:users /home \ + /add_new_file.sh RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ From 4089d1f7ba8f79d5dadc33c9b5d9ebbd87e7f6c2 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 13:03:57 -0800 Subject: [PATCH 72/78] Update Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 945afc6..70d97cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,18 +20,18 @@ COPY root/ / usermod -g 100 nobody && \ usermod -d /home nobody && \ chown -R nobody:users /home \ - /add_new_file.sh RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse" && \ apt-get update -q && \ -apt-get install -qy ruby ruby-dev git make gcc inotify-tools && \ +apt-get install -qy ruby ruby-dev git make gcc && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ cd /opt/gem && \ gem install bundler -v 1.12.3 && \ -bundle install +bundle install \ +bash -c "/add_new_file.sh" VOLUME /config From d53752d4e3fecdf4eefda2348f38e6cd0da17e3c Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 13:48:18 -0800 Subject: [PATCH 73/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 70d97cb..f8f5889 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ cd /opt/gem && \ gem install bundler -v 1.12.3 && \ -bundle install \ +bundle install && \ bash -c "/add_new_file.sh" VOLUME /config From 291594f7bdd7bfb4ef53d15512799c9e0d0cfb70 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 14:01:40 -0800 Subject: [PATCH 74/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f8f5889..a7f2820 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ COPY root/ / usermod -u 99 nobody && \ usermod -g 100 nobody && \ usermod -d /home nobody && \ - chown -R nobody:users /home \ + chown -R nobody:users /home RUN \ add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse" && \ From 66ead9a03b8c180d3a805eb79d59eb7b7f0610cc Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 16:40:33 -0800 Subject: [PATCH 75/78] Update Dockerfile --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7f2820..a13a714 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,9 @@ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* && \ cd /opt/gem && \ gem install bundler -v 1.12.3 && \ -bundle install && \ -bash -c "/add_new_file.sh" +bundle install + +RUN /add_new_file.sh VOLUME /config From c2b0c7acc44efc4e1d70ec88ac62c04afc16632a Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 17:05:26 -0800 Subject: [PATCH 76/78] Update Dockerfile --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a13a714..65a29b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 # Use baseimage-docker's init system -CMD ["/sbin/my_init"] +CMD ["/sbin/my_init", "/add_new_file.sh"] #copy plexReport files COPY root/ / @@ -32,7 +32,5 @@ cd /opt/gem && \ gem install bundler -v 1.12.3 && \ bundle install -RUN /add_new_file.sh - VOLUME /config From f71be3defb67957c6095653a52cd475f6a2b92bc Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 17:44:25 -0800 Subject: [PATCH 77/78] Update Dockerfile --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 65a29b4..8aa7733 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,15 @@ ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 # Use baseimage-docker's init system -CMD ["/sbin/my_init", "/add_new_file.sh"] +CMD ["/sbin/my_init"] #copy plexReport files COPY root/ / +#add new web_email_body.erb +RUN mkdir -p /etc/my_init.d +ADD add_new_file.sh /etc/my_init.d/add_new_file.sh + # Configure user nobody to match unRAID's settings RUN \ usermod -u 99 nobody && \ From b128b0a3048499b4157345a4fff8127aec1b8587 Mon Sep 17 00:00:00 2001 From: ninthwalker Date: Wed, 8 Mar 2017 18:58:11 -0800 Subject: [PATCH 78/78] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8aa7733..9c98c9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY root/ / #add new web_email_body.erb RUN mkdir -p /etc/my_init.d -ADD add_new_file.sh /etc/my_init.d/add_new_file.sh +ADD /root/add_new_file.sh /etc/my_init.d/add_new_file.sh # Configure user nobody to match unRAID's settings RUN \