Skip to content
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 delete of pwm_fan_control.py command from .bashrc in install_service.sh #12

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

lubomben
Copy link

install_service.sh should be executed with sudo otherwise it fails.

In addition, if executed with sudo the variable $HOME will be evaluated with "/root" so the line with "pwm_fan_control.py" will not be found in .bashrc so we should use another variable evaluated tu the user's home that execute sudo:

USER_HOME=$(getent passwd $SUDO_USER | cut -d: -f6)
sed -i '/pwm_fan_control.py/d' $USER_HOME/.bashrc

thorkseng and others added 11 commits September 12, 2021 13:50
This file will create a basic service that call the pwm_fan_control.py in any start of the raspberry pi.
in ExecStart you use #{HOME} so when service is start its not find pwm_fan_control.py.
Because it declare as "/root/x735-v2.5/pwm_fan_control.py" and it failed to start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants