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:
parent
83ceeda6f3
commit
1e32dac8da
@ -23,8 +23,20 @@ if [[ ! -d /opt/configure-stormux ]]; then
|
||||
read -r continue
|
||||
nmtui-connect
|
||||
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..."
|
||||
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
|
||||
|
||||
pushd /opt/configure-stormux
|
||||
|
@ -23,6 +23,18 @@ if [[ ! -d /opt/configure-stormux ]]; then
|
||||
read -r continue
|
||||
nmtui-connect
|
||||
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..."
|
||||
sudo git -C /opt clone -q https://git.stormux.org/storm/configure-stormux || exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user