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