From 48b67d93284c3b16cd09b6cc511f653d6d336751 Mon Sep 17 00:00:00 2001 From: kauffman-repo <58049841+kauffman-repo@users.noreply.github.com> Date: Thu, 9 Jan 2020 20:04:51 +0100 Subject: [PATCH 1/2] Update directoryfix.sh fix for username not equal pi --- .templates/python/directoryfix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.templates/python/directoryfix.sh b/.templates/python/directoryfix.sh index 437d4b45..422a9885 100755 --- a/.templates/python/directoryfix.sh +++ b/.templates/python/directoryfix.sh @@ -4,7 +4,7 @@ if [ ! -d ./volumes/python/app ]; then sudo mkdir -p ./volumes/python/app - sudo chown -R pi:pi ./volumes/python + sudo chown -R $(whoami):$(whoami) ./volumes/python echo 'print("hello world")' >./volumes/python/app/app.py fi From 09351d6525c21c57b34b1b9df7c1ad9a3f479fab Mon Sep 17 00:00:00 2001 From: kauffman-repo <58049841+kauffman-repo@users.noreply.github.com> Date: Thu, 9 Jan 2020 20:33:36 +0100 Subject: [PATCH 2/2] Update directoryfix.sh --- .templates/python/directoryfix.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.templates/python/directoryfix.sh b/.templates/python/directoryfix.sh index 422a9885..93725145 100755 --- a/.templates/python/directoryfix.sh +++ b/.templates/python/directoryfix.sh @@ -2,9 +2,12 @@ # Directoryfix for python +#current user +u=$(whoami) + if [ ! -d ./volumes/python/app ]; then sudo mkdir -p ./volumes/python/app - sudo chown -R $(whoami):$(whoami) ./volumes/python + sudo chown -R $u:$u ./volumes/python echo 'print("hello world")' >./volumes/python/app/app.py fi