Updated configure-stormus stub file. Because it is ran initially as root, no need for the sudo calls. Also handle removal of the cron job that causes it to run on the first boot of the image.

This commit is contained in:
Storm Dragon 2023-09-24 15:47:42 -04:00
parent 7ed27d5c65
commit 4f7dbb4f82

View File

@ -9,8 +9,8 @@ if [[ ! -d /opt/configure-stormux ]]; then
read -r continue read -r continue
continue="${continue::1}" continue="${continue::1}"
if [[ "${continue,}" == "y" ]];then if [[ "${continue,}" == "y" ]];then
sudo -A sed -i 's/=desktop/=laptop/' /etc/fenrirscreenreader/settings/settings.conf sed -i 's/=desktop/=laptop/' /etc/fenrirscreenreader/settings/settings.conf
sudo -A systemctl restart fenrirscreenreader.service systemctl restart fenrirscreenreader.service
clear clear
fi fi
if ! ping -c1 stormux.org &> /dev/null ; then if ! ping -c1 stormux.org &> /dev/null ; then
@ -32,13 +32,15 @@ if ping -qc1 -W 1 stormux.org &> /dev/null; then
date_time=$(curl -s http://worldtimeapi.org/api/ip | grep -oP '(?<="datetime":")[^"]*') date_time=$(curl -s http://worldtimeapi.org/api/ip | grep -oP '(?<="datetime":")[^"]*')
echo "Current date and time: $date_time" echo "Current date and time: $date_time"
# set date and time # set date and time
sudo -A date -s "$date_time" date -s "$date_time"
else else
echo "Please connect to the internet and run ${0##*/} again." echo "Please connect to the internet and run ${0##*/} again."
exit 1 exit 1
fi fi
echo "Installing configure-stormux..." echo "Installing configure-stormux..."
sudo -A git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1 git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1
# The main script is installed, no need for first run any more.
rm -f /etc/chron.d/0firstrun
fi fi
pushd /opt/configure-stormux pushd /opt/configure-stormux