diff --git a/gonotego/supervisord.conf b/gonotego/supervisord.conf index f7ced19f..2752b5fc 100644 --- a/gonotego/supervisord.conf +++ b/gonotego/supervisord.conf @@ -25,7 +25,7 @@ password=notego [program:GoNoteGo-audio-listener] command=/home/pi/code/github/dbieber/GoNoteGo/env/bin/python /home/pi/code/github/dbieber/GoNoteGo/gonotego/audio/runner.py directory=/home/pi -user=root +user=pi [program:GoNoteGo-command-center] environment=XDG_RUNTIME_DIR="/run/user/1000" @@ -36,7 +36,7 @@ user=pi [program:GoNoteGo-text-listener] command=/home/pi/code/github/dbieber/GoNoteGo/env/bin/python /home/pi/code/github/dbieber/GoNoteGo/gonotego/text/runner.py directory=/home/pi -user=root +user=pi [program:GoNoteGo-transcription] environment=GOOGLE_APPLICATION_CREDENTIALS="/home/pi/secrets/google_credentials.json",LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0 @@ -52,4 +52,4 @@ user=pi [program:GoNoteGo-settings] command=/home/pi/code/github/dbieber/GoNoteGo/env/bin/python /home/pi/code/github/dbieber/GoNoteGo/gonotego/settings/server.py directory=/home/pi -user=root +user=pi diff --git a/scripts/install_settings.sh b/scripts/install_settings.sh index 4802f131..78eae1a4 100755 --- a/scripts/install_settings.sh +++ b/scripts/install_settings.sh @@ -12,4 +12,10 @@ if [ -f "$source_file" ]; then # Rename the original file to a backup file mv "$source_file" "$backup_file" + + # Ensure the copied settings file is owned by pi user + chown pi:pi "$target_dir/$(basename "$source_file")" fi + +# Ensure the entire GoNoteGo repo is owned by pi user +chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo