x735-v2.5 icon indicating copy to clipboard operation
x735-v2.5 copied to clipboard

Fix delete of pwm_fan_control.py command from .bashrc in install_service.sh

Open lubomben opened this issue 3 years ago • 0 comments

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

lubomben avatar Dec 16 '21 14:12 lubomben