Skip to content

Commit fec3260

Browse files
authored
Merge pull request #8 from SensorsIot/pr/143
get current user in directoryfix.sh
2 parents 3e3b8fe + 09351d6 commit fec3260

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.templates/python/directoryfix.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
# Directoryfix for python
44

5+
#current user
6+
u=$(whoami)
7+
58
if [ ! -d ./volumes/python/app ]; then
69
sudo mkdir -p ./volumes/python/app
7-
sudo chown -R pi:pi ./volumes/python
10+
sudo chown -R $u:$u ./volumes/python
811
echo 'print("hello world")' >./volumes/python/app/app.py
912

1013
fi

0 commit comments

Comments
 (0)