From 9e63066eea9b16a67b93c11b4041defef87a40b1 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sun, 11 Jun 2017 00:48:27 +0100 Subject: [PATCH 1/3] change paths, tidy up, remove grab on start --- Dockerfile | 29 ++++++++++++++++++----------- root/defaults/abc | 1 - root/{wg++ => defaults}/update.sh | 5 +++-- root/defaults/wg-cron | 1 + root/etc/cont-init.d/30-config | 21 ++++++++------------- root/etc/cont-init.d/40-grab | 9 --------- 6 files changed, 30 insertions(+), 36 deletions(-) delete mode 100644 root/defaults/abc rename root/{wg++ => defaults}/update.sh (65%) create mode 100644 root/defaults/wg-cron delete mode 100644 root/etc/cont-init.d/40-grab diff --git a/Dockerfile b/Dockerfile index e931871..ffe9021 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" # Set correct environment variables. -ENV HOME /config ARG DEBIAN_FRONTEND="noninteractive" +ENV HOME /config # install runtime dependencies RUN \ @@ -16,19 +16,26 @@ RUN \ apt-get install -y \ cron && \ -# download and extract WG++ to correct paths - mkdir wg++ && \ +# install webgrab + mkdir -p \ + /app/wg++ && \ curl -o /tmp/wg++.tar.gz -L \ http://webgrabplus.com/sites/default/files/download/SW/V2.0.0/WebGrabPlus_V2.0_install.tar.gz && \ - tar xzf /tmp/wg++.tar.gz --strip-components=1 -C /wg++/ && \ + tar xzf \ + /tmp/wg++.tar.gz -C \ + /app/wg++ --strip-components=1 && \ -# download update - curl -o /tmp/update.tar.gz -L \ +# install wg-update + curl -o \ + /tmp/update.tar.gz -L \ http://webgrabplus.com/sites/default/files/download/SW/V2.0.7/WebGrabPlus_V2.0.7_beta_install.tar.gz && \ - tar xf /tmp/update.tar.gz --strip-components=2 -C /wg++/bin/ && \ + tar xf \ + /tmp/update.tar.gz -C \ + /app/wg++/bin/ --strip-components=2 && \ -# download Siteini.pack - curl -o /tmp/ini.zip -L \ +# download siteini.pack + curl -o \ + /tmp/ini.zip -L \ http://webgrabplus.com/sites/default/files/download/ini/SiteIniPack_current.zip && \ unzip /tmp/ini.zip -d /defaults/ini/ && \ @@ -41,5 +48,5 @@ RUN \ # copy files COPY root/ / -VOLUME /config \ - /data +# ports and volumes +VOLUME /config /data diff --git a/root/defaults/abc b/root/defaults/abc deleted file mode 100644 index d1c4321..0000000 --- a/root/defaults/abc +++ /dev/null @@ -1 +0,0 @@ -2 3 * * * /wg++/update.sh diff --git a/root/wg++/update.sh b/root/defaults/update.sh similarity index 65% rename from root/wg++/update.sh rename to root/defaults/update.sh index 71ce14a..b4daaff 100644 --- a/root/wg++/update.sh +++ b/root/defaults/update.sh @@ -1,5 +1,6 @@ #!/usr/bin/with-contenv bash -cd /wg++/bin +cd /app/wg++/bin || exit + mono WebGrab+Plus.exe "/config" -exit 0 \ No newline at end of file +exit 0 diff --git a/root/defaults/wg-cron b/root/defaults/wg-cron new file mode 100644 index 0000000..36d2daa --- /dev/null +++ b/root/defaults/wg-cron @@ -0,0 +1 @@ +2 3 * * * /defaults/update.sh diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 9924399..b3ac100 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,23 +1,18 @@ #!/usr/bin/with-contenv bash -# Check if Webgrab++ config file exists in config folder. +# copy config [[ ! -e /config/WebGrab++.config.xml ]] && \ cp /defaults/WebGrab++.config.xml /config/ - -# Check if Ini folder exists in config folder. [[ ! -e /config/ini/siteini.pack ]] && \ cp -R /defaults/ini/siteini.pack /config/ -# Copy default cron file if not in config -[[ ! -e /config/abc ]] && \ - cp /defaults/abc /config/abc - # add cron file for running webgrab+plus -[[ -e /config/abc ]] && \ - crontab -u abc /config/abc +[[ ! -e /config/wg-cron ]] && \ + cp /defaults/wg-cron /config/wg-cron +crontab -u abc /config/wg-cron -# Change owner for config files and guide.xml -chown -R abc:abc /config \ - /data -chmod 766 /config \ +# permissions +chown -R abc:abc \ + /config \ /data + diff --git a/root/etc/cont-init.d/40-grab b/root/etc/cont-init.d/40-grab deleted file mode 100644 index b0f10f3..0000000 --- a/root/etc/cont-init.d/40-grab +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/with-contenv bash - -[[ -e /config/WebGrab++.config.xml ]] && \ - cd /wg++/bin || exit - exec \ - s6-setuidgid abc \ - mono WebGrab+Plus.exe "/config" - -exit 0 \ No newline at end of file From e63834b6bb6d48b2052b5b0ee5b852df0be7d006 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sun, 11 Jun 2017 01:09:58 +0100 Subject: [PATCH 2/3] light draft READMETEMPLATE.md --- READMETEMPLATE.md | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/READMETEMPLATE.md b/READMETEMPLATE.md index 6e30fb1..510f76a 100644 --- a/READMETEMPLATE.md +++ b/READMETEMPLATE.md @@ -2,8 +2,8 @@ [forumurl]: https://forum.linuxserver.io [ircurl]: https://www.linuxserver.io/irc/ [podcasturl]: https://www.linuxserver.io/podcast/ -[appurl]: www.example.com -[hub]: https://hub.docker.com/r/example/example/ +[appurl]: http://www.webgrabplus.com +[hub]: https://hub.docker.com/r/linuxserver/webgrabplus/ [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] @@ -12,23 +12,20 @@ The [LinuxServer.io][linuxserverurl] team brings you another container release f * [IRC][ircurl] on freenode at `#linuxserver.io` * [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation! -# +# linuxserver/webgrabplus +[![](https://images.microbadger.com/badges/version/linuxserver/webgrabplus.svg)](https://microbadger.com/images/linuxserver/webgrabplus "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/webgrabplus.svg)](http://microbadger.com/images/linuxserver/webgrabplus "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/webgrabplus.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/webgrabplus.svg)][hub][![Build Status](http://jenkins.linuxserver.io:8080/buildStatus/icon?job=Dockers/LinuxServer.io/linuxserver-webgrabplus)](http://jenkins.linuxserver.io:8080/job/Dockers/job/LinuxServer.io/job/linuxserver-webgrabplus/) -Provide a short, concise description of the application. No more than two SHORT paragraphs. Link to sources where possible and include an image illustrating your point if necessary. Point users to the original applications website, as that's the best place to get support - not here. - -Our Plex container has immaculate docs so follow that if in doubt for layout. - -`IMPORTANT, replace all instances of with the correct dockerhub repo (ie linuxserver/plex) and information (ie, plex)` +[WebGrab+Plus][appurl] is a multi-site incremental xmltv epg grabber. It collects tv-program guide data from selected tvguide sites for your favourite channels. ## Usage ``` docker create \ - --name= \ + --name=webgrabplus \ -v :/config \ + -v :/data \ -e PGID= -e PUID= \ - -p 1234:1234 \ - + linuxserver/webgrabplus ``` ## Parameters @@ -40,12 +37,12 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po -* `-p 1234` - the port(s) -* `-v /config` - explain what lives here +* `-v /config` - where webgrabplus should store it's config files +* `-v /config` - where webgrabplus should store it's data files * `-e PGID` for GroupID - see below for explanation * `-e PUID` for UserID - see below for explanation -It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it /bin/bash`. +It is based on ubuntu-xenial with s6 overlay, for shell access whilst the container is running do `docker exec -it webgrabplus /bin/bash`. ### User / Group Identifiers @@ -65,16 +62,16 @@ Insert a basic user guide here to get a n00b up and running with the software in ## Info -* Shell access whilst the container is running: `docker exec -it /bin/bash` -* To monitor the logs of the container in realtime: `docker logs -f ` +* Shell access whilst the container is running: `docker exec -it webgrabplus /bin/bash` +* To monitor the logs of the container in realtime: `docker logs -f webgrabplus` * container version number -`docker inspect -f '{{ index .Config.Labels "build_version" }}' ` +`docker inspect -f '{{ index .Config.Labels "build_version" }}' webgrabplus` * image version number -`docker inspect -f '{{ index .Config.Labels "build_version" }}' ` +`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/webgrabplus` ## Versions From e217dcd618e1a0954576717158cc0ff0c68df0a1 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sun, 11 Jun 2017 01:12:44 +0100 Subject: [PATCH 3/3] light draft READMETEMPLATE.md --- READMETEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/READMETEMPLATE.md b/READMETEMPLATE.md index 510f76a..58098a8 100644 --- a/READMETEMPLATE.md +++ b/READMETEMPLATE.md @@ -42,7 +42,7 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po * `-e PGID` for GroupID - see below for explanation * `-e PUID` for UserID - see below for explanation -It is based on ubuntu-xenial with s6 overlay, for shell access whilst the container is running do `docker exec -it webgrabplus /bin/bash`. +It is based on ubuntu xenial with s6 overlay, for shell access whilst the container is running do `docker exec -it webgrabplus /bin/bash`. ### User / Group Identifiers