From 39e7e9ce6dc3275c5261d83079a27b9528735c43 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Tue, 19 Jan 2016 07:33:01 +0000 Subject: [PATCH] add opt out for autoupdates to git update init --- init/30_update.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/init/30_update.sh b/init/30_update.sh index c078714..9459b82 100755 --- a/init/30_update.sh +++ b/init/30_update.sh @@ -1,10 +1,13 @@ #!/bin/bash -mkdir -p /app -chown abc:abc /app /config -if [ ! -d /app/headphones/.git ]; then - /sbin/setuser abc git clone https://github.com/rembo10/headphones.git /app/headphones -else - cd /app/headphones - /sbin/setuser abc git pull -fi +[[ ! -d /app/headphones/.git ]] && (git clone https://github.com/rembo10/headphones.git /app/headphones && \ +chown -R abc:abc /app) + + +# opt out for autoupdates +[ "$ADVANCED_DISABLEUPDATES" ] && exit 0 + +cd /app/headphones +git pull +chown -R abc:abc /app +