From ab964204b3a08c73aa698c39af76b8341c2f27c1 Mon Sep 17 00:00:00 2001 From: Falko Schindler Date: Tue, 9 Jul 2024 13:53:42 +0200 Subject: [PATCH] install air-link using a login rather than interactive shell --- README.md | 9 +++++---- air_link/air_link.service | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c6f149f..108b73a 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,11 @@ The edge device needs to run a Linux-based OS and have Python >=3.8 installed. > # install pyenv > curl https://pyenv.run | bash > -> # add pyenv to shell -> echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -> echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -> echo 'eval "$(pyenv init -)"' >> ~/.bashrc +> # add pyenv to login shell .profile, maybe also .bashrc, .zshrc, etc. depending on your shell +> # see https://github.com/pyenv/pyenv?tab=readme-ov-file#set-up-your-shell-environment-for-pyenv +> echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile +> echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile +> echo 'eval "$(pyenv init -)"' >> ~/.profile > > # source the bashrc > source ~/.bashrc diff --git a/air_link/air_link.service b/air_link/air_link.service index ac60c40..aea67a2 100644 --- a/air_link/air_link.service +++ b/air_link/air_link.service @@ -5,7 +5,7 @@ After=multi-user.target [Service] Type=simple WorkingDirectory=/home/USER/ -ExecStart=/bin/bash -i -c "air-link run" +ExecStart=/usr/bin/env bash --login -c "air-link run" User=USER Group=USER Restart=always