From 3387809242115ce06cf42c39b1d3a1350025f02d Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 18 Jan 2016 09:54:30 +0000 Subject: [PATCH] add opt out for autoupdates to git update init --- Dockerfile | 4 ++-- init/50_set_the_site.sh | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 167ee14..dc73a04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM linuxserver/baseimage.apache MAINTAINER Sparklyballs # Set correct environment variables -ENV APTLIST="git-core php5-gmp php5-intl php5-mysqlnd php5-pgsql" -ENV LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8" +ENV APTLIST="git-core php5-gmp php5-intl php5-mysqlnd php5-pgsql" \ +LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8" # Set the locale RUN locale-gen en_US.UTF-8 diff --git a/init/50_set_the_site.sh b/init/50_set_the_site.sh index 211826e..3332b33 100644 --- a/init/50_set_the_site.sh +++ b/init/50_set_the_site.sh @@ -1,10 +1,10 @@ #!/bin/bash -if [ ! -f "/config/www/freshrss/index.php" ]; then -echo "fetching freshress files" -git clone https://github.com/marienfressinaud/FreshRSS/ /config/www/freshrss -else -echo "checking for updates" +[[ ! -f /config/www/freshrss/index.php ]] && (git clone https://github.com/marienfressinaud/FreshRSS/ /config/www/freshrss && \ +chown -R abc:abc /config) + +# opt out for autoupdates +[ "$ADVANCED_DISABLEUPDATES" ] && exit 0 + cd /config/www/freshrss git pull -fi chown -R abc:abc /config