The configure-stormux stub should now set the clock before updating so that there will not be certificate is not yet valid errors.

This commit is contained in:
stormdragon2976 2023-01-19 01:00:33 -05:00
parent 83ceeda6f3
commit 1e32dac8da
2 changed files with 25 additions and 1 deletions

View File

@ -23,8 +23,20 @@ if [[ ! -d /opt/configure-stormux ]]; then
read -r continue read -r continue
nmtui-connect nmtui-connect
fi fi
# Check for internet connectivity
if ping -qc1 -W 1 gnu.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
sudo date -s "$date_time"
else
echo "Please connect to the internet and run ${0##*/} again."
exit 1
fi
echo "Installing configure-stormux..." echo "Installing configure-stormux..."
sudo git -C /opt clone -q https://gitlab.com/stormux/configure-stormux.git || exit 1 sudo git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1
fi fi
pushd /opt/configure-stormux pushd /opt/configure-stormux

View File

@ -23,6 +23,18 @@ if [[ ! -d /opt/configure-stormux ]]; then
read -r continue read -r continue
nmtui-connect nmtui-connect
fi fi
# Check for internet connectivity
if ping -qc1 -W 1 gnu.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
sudo date -s "$date_time"
else
echo "Please connect to the internet and run ${0##*/} again."
exit 1
fi
echo "Installing configure-stormux..." echo "Installing configure-stormux..."
sudo git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1 sudo git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1
fi fi