-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file is executed by rc.local on the Pi ISO release.
- Loading branch information
Ben
committed
Dec 2, 2018
1 parent
3ba4284
commit 0d07da7
Showing
2 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
.DS_Store | ||
|
||
.DS_Store | ||
update-addresses.sh | ||
install | ||
init.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
# Let's wait 1 full minute for services to start and network card initializations to finish. | ||
|
||
printf "\n\n\n\n\n\n\n\nLynxCI initialization will start in 60 seconds.\n\n\n\n\n\n" | ||
|
||
sleep 60 | ||
|
||
# Ping Google NS server to test public network access | ||
|
||
if /bin/ping -c 1 8.8.8.8 &> /dev/null | ||
then | ||
|
||
# Remove the file if it already exists from a previous try. | ||
|
||
rm -rf /root/setup.sh | ||
|
||
# Grab the remote file. If it failes for any reason, reboot. | ||
|
||
if /usr/bin/wget -O /root/setup.sh https://getlynx.io/setup.sh; then | ||
|
||
# File exists and is a regular file. A regular file is neither a block or character special file nor a directory. | ||
|
||
if [ -f "/root/setup.sh" ]; then | ||
|
||
# File exists and has a size of more than 0 bytes. | ||
|
||
if [ -s "/root/setup.sh" ]; then | ||
|
||
/bin/chmod 700 /root/setup.sh | ||
|
||
/root/setup.sh | ||
|
||
else | ||
|
||
echo "Downloaded setup script was corrupted (-s). Rebooting and will try again." | ||
|
||
sleep 30 | ||
|
||
reboot | ||
|
||
fi | ||
|
||
else | ||
|
||
echo "Downloaded setup script was corrupted (-f). Rebooting and will try again." | ||
|
||
sleep 30 | ||
|
||
reboot | ||
|
||
fi | ||
|
||
else | ||
|
||
echo "Failed to download setup script. Rebooting and will try again." | ||
|
||
sleep 30 | ||
|
||
reboot | ||
|
||
fi | ||
|
||
else | ||
|
||
echo "No public network access detected. If using wifi, verify your /boot/wpa_supplicant.conf file is set up properly. Rebooting and will try again." | ||
|
||
sleep 60 | ||
|
||
reboot | ||
|
||
fi |