x735-v2.5
x735-v2.5 copied to clipboard
Fix delete of pwm_fan_control.py command from .bashrc in install_service.sh
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