2021-10-24 01:40:14 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
trap 'popd &> /dev/null' EXIT
|
2023-08-19 10:37:02 -04:00
|
|
|
|
|
|
|
export SUDO_ASKPASS=/etc/audibleprompt.sh
|
2021-10-24 01:40:14 -04:00
|
|
|
if [[ ! -d /opt/configure-stormux ]]; then
|
2022-03-31 23:41:41 -04:00
|
|
|
# Offer to switch fenrir layout.
|
|
|
|
echo "Would you like to switch Fenrir to laptop layout? (y/n)"
|
|
|
|
read -r continue
|
|
|
|
continue="${continue::1}"
|
|
|
|
if [[ "${continue,}" == "y" ]];then
|
2023-09-24 15:47:42 -04:00
|
|
|
sed -i 's/=desktop/=laptop/' /etc/fenrirscreenreader/settings/settings.conf
|
|
|
|
systemctl restart fenrirscreenreader.service
|
2022-04-04 03:10:22 -04:00
|
|
|
clear
|
2022-03-31 23:41:41 -04:00
|
|
|
fi
|
|
|
|
if ! ping -c1 stormux.org &> /dev/null ; then
|
|
|
|
echo "No internet connection detected. Press enter to open NetworkManager."
|
|
|
|
echo "Note, it is best to put Fenrir into highlight mode while using NetworkManager."
|
|
|
|
echo "In desktop layout this is done by pressing Fenrir+numpad asterisk."
|
|
|
|
echo "That is the key just above numpad 9."
|
|
|
|
echo "In laptop mode, press Fenrir+y."
|
|
|
|
echo "In desktop mode the Fenrir key is numpad insert."
|
|
|
|
echo "In laptop mode the Fenrir key is the Super key, sometimes called the Windows key."
|
|
|
|
echo "Press enter to continue."
|
|
|
|
read -r continue
|
|
|
|
nmtui-connect
|
|
|
|
fi
|
2023-09-24 15:47:42 -04:00
|
|
|
# Check for internet connectivity
|
|
|
|
if ping -qc1 -W 1 stormux.org &> /dev/null; then
|
|
|
|
echo "Updating the clock to prevent certificate errors..."
|
|
|
|
# Get current date and time
|
|
|
|
date_time=$(curl -s http://worldtimeapi.org/api/ip | grep -oP '(?<="datetime":")[^"]*')
|
|
|
|
echo "Current date and time: $date_time"
|
|
|
|
# set date and time
|
|
|
|
date -s "$date_time"
|
|
|
|
else
|
|
|
|
echo "Please connect to the internet and run ${0##*/} again."
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-10-24 01:40:14 -04:00
|
|
|
echo "Installing configure-stormux..."
|
2023-09-24 15:47:42 -04:00
|
|
|
git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1
|
2021-10-24 01:40:14 -04:00
|
|
|
fi
|
|
|
|
|
2024-03-03 14:38:44 -05:00
|
|
|
echo
|
|
|
|
echo "Initial setup is complete."
|
|
|
|
echo
|
|
|
|
echo "If you would like more options, run configure-stormux,"
|
|
|
|
echo "or you may configure your system manually."
|
|
|
|
echo
|
|
|
|
echo "Thank you for choosing Stormux."
|
|
|
|
|
|
|
|
|
2021-10-24 01:40:14 -04:00
|
|
|
|
|
|
|
exit 0
|