-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix remapper $HOME path #81
Conversation
@@ -40,6 +40,8 @@ sudo cp $HOME/bthidhub/install/on_rpi/sdp_record.xml /etc/bluetooth/sdp_record.x | |||
sudo cp $HOME/bthidhub/install/on_rpi/input.conf /etc/bluetooth/input.conf | |||
sudo cp $HOME/bthidhub/install/on_rpi/main.conf /etc/bluetooth/main.conf | |||
|
|||
sudo sed -i "s/\/home\/pi/\/home\/$(basename $HOME)/g" $HOME/bthidhub/install/on_rpi/remapper.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it'd be a little safer to just put {PI_USER}
in the service file and replace that?
Also, I'd rather edit the copied file than end up with uncommitted changes in the repo (i.e. regular UI improvements can be upgraded with git pull
if the repo contents are not modified).
@@ -40,6 +40,8 @@ sudo cp $HOME/bthidhub/install/on_rpi/sdp_record.xml /etc/bluetooth/sdp_record.x | |||
sudo cp $HOME/bthidhub/install/on_rpi/input.conf /etc/bluetooth/input.conf | |||
sudo cp $HOME/bthidhub/install/on_rpi/main.conf /etc/bluetooth/main.conf | |||
|
|||
sudo sed -i "s/\/home\/pi/\/home\/$(basename $HOME)/g" $HOME/bthidhub/install/on_rpi/remapper.service | |||
sudo sed -i "s/PI_USER = 'pi'/PI_USER = '$(basename $HOME)'/g" $HOME/bthidhub/web.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with uncommitted change in this file. At worst, we could write a new file and have the code read the user from that file. Maybe a better approach would be to pass the user in the service file to the application?
Feel free to separate the revised changes into 2 PRs, in order to get them merged quicker. |
Added a replace to fix remapper.service on different users