From 9c81fe287b812ec6251093eef947d4c70abf5093 Mon Sep 17 00:00:00 2001 From: Sean Dion Date: Tue, 4 Aug 2015 19:43:37 -0500 Subject: [PATCH] set user to run as abc --- init/20_update.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/init/20_update.sh b/init/20_update.sh index afa762b..796ccf0 100755 --- a/init/20_update.sh +++ b/init/20_update.sh @@ -1,8 +1,9 @@ #!/bin/bash -if [ ! -d /opt/headphones/.git ]; then - git clone https://github.com/rembo10/headphones.git /opt/headphones +/sbin/setuser abc mkdir -p /app + +if [ ! -d /app/headphones/.git ]; then + /sbin/setuser abc git clone https://github.com/rembo10/headphones.git /app/headphones else - cd /opt/headphones - git pull + cd /app/headphones + /sbin/setuser abc git pull fi -chown -R abc:abc /opt/headphones