Update 00-pi_firmware_install.sh
This commit is contained in:
parent
eb60dd7c7c
commit
61fd5e3ef8
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Get the current user
|
||||
CURRENT_USER=$(whoami)
|
||||
|
||||
# Update system and install dependencies
|
||||
sudo apt-get update && sudo apt-get upgrade -y
|
||||
sudo apt install -y python3
|
||||
|
@ -16,9 +19,9 @@ sudo chmod +x *.sh
|
|||
# Run the installation script
|
||||
sudo bash install.sh
|
||||
|
||||
# Add alias and Python script to .bashrc for user 'anon'
|
||||
sudo -u anon bash -c "echo \"alias off='sudo /home/anon/x735-v2.5/x735softsd.sh'\" >> ~/.bashrc"
|
||||
sudo -u anon bash -c "echo \"python /home/anon/x735-v2.5/pwm_fan_control.py &\" >> ~/.bashrc"
|
||||
# Add alias and Python script to .bashrc for the current user
|
||||
sudo -u $CURRENT_USER bash -c "echo \"alias off='sudo /home/$CURRENT_USER/x735-v2.5/x735softsd.sh'\" >> /home/$CURRENT_USER/.bashrc"
|
||||
sudo -u $CURRENT_USER bash -c "echo \"python /home/$CURRENT_USER/x735-v2.5/pwm_fan_control.py &\" >> /home/$CURRENT_USER/.bashrc"
|
||||
|
||||
# Notify user
|
||||
echo "Setup complete. Please open a new terminal for changes to take effect."
|
Loading…
Reference in New Issue