Open main menu

Changes

XScript

802 bytes added, 18:42, 15 June 2023
no edit summary
sudo reboot now
</pre>
 
== For DietPi==
DietPi_RPi-ARMv8-Bullseye.7z
 
'''Install'''
 
login via teminal window, the default user name is `root`, password is `dietpi`, then run the following command:
<pre>
cd ~
sudo apt-get update
sudo apt-get -y upgrade
#sudo apt-get -y install git i2c-tools python3-smbus python3-rpi.gpio
 
git clone https://github.com/geekworm-com/xscript.git
 
cd xscript
sudo chmod +x *.sh rc.local
sudo cp -f ./pwr.sh /etc/pwr.sh
sudo cp -f ./softsd.sh /usr/local/bin/softsd.sh
 
sudo cp -f ./rc.local /etc/rc.local
 
sudo sed -i '$ i /etc/pwr.sh &' /etc/rc.local
echo "alias xoff='sudo /usr/local/bin/softsd.sh'" >> ~/.bashrc
 
#Enable fan fun when the device reboot
sudo sed -i '$ i python3 /root/xscript/fan-rpi.py&' /etc/rc.local
 
sudo reboot now
</pre>
 
<!--Add review function! -->