mirror of
https://github.com/okunze/Argon40-ArgonOne-Script.git
synced 2024-11-17 19:08:57 +01:00
Automated Change by GitHub Action
This commit is contained in:
parent
7e0efe0de8
commit
c48103aa3b
@ -45,6 +45,7 @@ uninstallscript=$INSTALLATIONFOLDER/argon-uninstall.sh
|
||||
shutdownscript=/lib/systemd/system-shutdown/argon-shutdown.sh
|
||||
configscript=$INSTALLATIONFOLDER/argon-config
|
||||
unitconfigscript=$INSTALLATIONFOLDER/argon-unitconfig.sh
|
||||
blstrdacconfigscript=$INSTALLATIONFOLDER/argon-blstrdac.sh
|
||||
|
||||
setupmode="Setup"
|
||||
|
||||
@ -146,7 +147,7 @@ argon_check_pkg() {
|
||||
fi
|
||||
}
|
||||
|
||||
CHECKDEVICE="one"
|
||||
CHECKDEVICE="one" # Hardcoded for argonone
|
||||
# Check if has RTC
|
||||
# Todo for multiple OS
|
||||
|
||||
@ -235,6 +236,9 @@ if [ $? -eq 0 ]
|
||||
then
|
||||
# Enable i2c and serial
|
||||
sudo raspi-config nonint do_i2c 0
|
||||
if [ ! "$CHECKDEVICE" = "fanhat" ]
|
||||
then
|
||||
|
||||
if [ "$CHECKPLATFORM" = "Raspbian" ]
|
||||
then
|
||||
# bookworm raspi-config prompts user when configuring serial
|
||||
@ -245,6 +249,7 @@ then
|
||||
sudo raspi-config nonint do_serial 2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Added to enabled NVMe for pi5
|
||||
set_nvme_default
|
||||
@ -281,10 +286,19 @@ sudo wget $ARGONDOWNLOADSERVER/scripts/argononed.py -O $powerbuttonscript --quie
|
||||
sudo wget $ARGONDOWNLOADSERVER/scripts/argononed.service -O $daemonfanservice --quiet
|
||||
sudo chmod 644 $daemonfanservice
|
||||
|
||||
if [ ! "$CHECKDEVICE" = "fanhat" ]
|
||||
then
|
||||
# IR Files
|
||||
sudo wget $ARGONDOWNLOADSERVER/scripts/argonone-irconfig.sh -O $irconfigscript --quiet
|
||||
sudo chmod 755 $irconfigscript
|
||||
|
||||
if [ ! "$CHECKDEVICE" = "eon" ]
|
||||
then
|
||||
sudo wget $ARGONDOWNLOADSERVER/scripts/argon-blstrdac.sh -O $blstrdacconfigscript --quiet
|
||||
sudo chmod 755 $blstrdacconfigscript
|
||||
fi
|
||||
fi
|
||||
|
||||
# Other utility scripts
|
||||
sudo wget $ARGONDOWNLOADSERVER/scripts/argon-versioninfo.sh -O $versioninfoscript --quiet
|
||||
sudo chmod 755 $versioninfoscript
|
||||
@ -300,6 +314,7 @@ sudo wget $ARGONDOWNLOADSERVER/scripts/argononed.py -O $powerbuttonscript --quie
|
||||
sudo wget $ARGONDOWNLOADSERVER/scripts/argon-unitconfig.sh -O $unitconfigscript --quiet
|
||||
sudo chmod 755 $unitconfigscript
|
||||
|
||||
|
||||
# Generate default Fan config file if non-existent
|
||||
if [ ! -f $daemonconfigfile ]; then
|
||||
sudo touch $daemonconfigfile
|
||||
@ -398,8 +413,6 @@ then
|
||||
do
|
||||
sudo wget $ARGONDOWNLOADSERVER/oled/${binfile}.bin -O $INSTALLATIONFOLDER/oled/${binfile}.bin --quiet
|
||||
done
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@ -458,16 +471,25 @@ echo 'do' >> $configscript
|
||||
echo ' echo' >> $configscript
|
||||
echo ' echo "Choose Option:"' >> $configscript
|
||||
echo ' echo " 1. Configure Fan"' >> $configscript
|
||||
|
||||
blstrdacoption=0
|
||||
|
||||
if [ "$CHECKDEVICE" = "fanhat" ]
|
||||
then
|
||||
uninstalloption="3"
|
||||
else
|
||||
echo ' echo " 2. Configure IR"' >> $configscript
|
||||
|
||||
uninstalloption="4"
|
||||
|
||||
if [ "$CHECKDEVICE" = "eon" ]
|
||||
then
|
||||
# ArgonEON Has RTC
|
||||
echo ' echo " 3. Configure RTC and/or Schedule"' >> $configscript
|
||||
echo ' echo " 4. Configure OLED"' >> $configscript
|
||||
uninstalloption="6"
|
||||
else
|
||||
uninstalloption="5"
|
||||
blstrdacoption=$(($uninstalloption-2))
|
||||
echo " echo \" $blstrdacoption. Configure BLSTR DAC (v3 only)\"" >> $configscript
|
||||
fi
|
||||
fi
|
||||
|
||||
unitsoption=$(($uninstalloption-1))
|
||||
@ -512,6 +534,8 @@ else
|
||||
echo ' mainloopflag=0' >> $configscript
|
||||
fi
|
||||
|
||||
if [ ! "$CHECKDEVICE" = "fanhat" ]
|
||||
then
|
||||
echo ' elif [ $newmode -eq 2 ]' >> $configscript
|
||||
echo ' then' >> $configscript
|
||||
echo " $irconfigscript" >> $configscript
|
||||
@ -529,6 +553,15 @@ then
|
||||
echo ' mainloopflag=0' >> $configscript
|
||||
fi
|
||||
|
||||
if [ $blstrdacoption -gt 0 ]
|
||||
then
|
||||
echo " elif [ \$newmode -eq $blstrdacoption ]" >> $configscript
|
||||
echo ' then' >> $configscript
|
||||
echo " $blstrdacconfigscript" >> $configscript
|
||||
echo ' mainloopflag=0' >> $configscript
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " elif [ \$newmode -eq $unitsoption ]" >> $configscript
|
||||
echo ' then' >> $configscript
|
||||
echo " $unitconfigscript" >> $configscript
|
||||
@ -590,9 +623,12 @@ then
|
||||
sudo ln -s $configscript /usr/bin/argonone-config
|
||||
sudo ln -s $uninstallscript /usr/bin/argonone-uninstall
|
||||
sudo ln -s $irconfigscript /usr/bin/argonone-ir
|
||||
elif [ "$CHECKDEVICE" = "fanhat" ]
|
||||
then
|
||||
sudo ln -s $configscript /usr/bin/argonone-config
|
||||
sudo ln -s $uninstallscript /usr/bin/argonone-uninstall
|
||||
fi
|
||||
|
||||
|
||||
# Enable and Start Service(s)
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable argononed.service
|
||||
|
Loading…
Reference in New Issue
Block a user