Basic network connectivity check

This commit is contained in:
icenine451 2023-03-09 09:08:33 -05:00
parent fb3a74427e
commit 67b95426d8
2 changed files with 14 additions and 0 deletions

View file

@ -557,6 +557,19 @@ do
done < $1 done < $1
} }
check_network_connectivity() {
# This function will do a basic check for network availability and return "true" if it is working.
# USAGE: if [[ check_network_connectivity == "true" ]]; then
wget -q --spider $rd_repo
if [ $? -eq 0 ]; then
echo "true"
else
echo "false"
fi
}
update_rd_conf() { update_rd_conf() {
# This function will import a default retrodeck.cfg file and update it with any current settings. This will allow us to expand the file over time while retaining current user settings. # This function will import a default retrodeck.cfg file and update it with any current settings. This will allow us to expand the file over time while retaining current user settings.
# USAGE: update_rd_conf # USAGE: update_rd_conf

View file

@ -14,6 +14,7 @@ bios_checklist="/var/config/retrodeck/tools/bios_checklist.cfg" # A config file
lockfile="/var/config/retrodeck/.lock" # where the lockfile is located lockfile="/var/config/retrodeck/.lock" # where the lockfile is located
default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path
hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem) hard_version="$(cat '/app/retrodeck/version')" # hardcoded version (in the readonly filesystem)
rd_repo="https://github.com/XargonWan/RetroDECK" # The official GitHub repo of RetroDECK
# Config files for emulators with single config files # Config files for emulators with single config files