change paths, tidy up, remove grab on start

This commit is contained in:
sparklyballs 2017-06-11 00:48:27 +01:00
parent f23109cb45
commit 9e63066eea
6 changed files with 30 additions and 36 deletions

View File

@ -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

View File

@ -1 +0,0 @@
2 3 * * * /wg++/update.sh

View File

@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bash
cd /wg++/bin
cd /app/wg++/bin || exit
mono WebGrab+Plus.exe "/config"
exit 0
exit 0

1
root/defaults/wg-cron Normal file
View File

@ -0,0 +1 @@
2 3 * * * /defaults/update.sh

View File

@ -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

View File

@ -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