littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
633 stars 112 forks source link

Exiting ss-update-config: There is a version mismatch between this script and public mirrors.. #186

Closed kidharb closed 1 year ago

kidharb commented 1 year ago

My config is as follows

SS_BUILD="JAN2023A"

while the ss-update-config is

SS_UPDATE_CONFIG_BUILD="FEB2023B"

which causes the mismatch message in the title

####################################################################################################
#### H. SS-Update-Config: Retrieve Latest SS-Config Boilerplate ####################################
####################################################################################################

## variables will only be copied over from the previous ss-config file if they are defined ##
## otherwise default (recommended) options will be used from the new boilerplate ##

## retrieve latest version of ss-config-sample ##
ss_wget "${TMP_SS_CONFIG}" "${MIRROR_SS_CONFIG_SAMPLE}"

## snippet variables ##
SS_BUILD_LATEST=$(source /tmp/ss-config; echo "${SS_BUILD}" 2> /dev/null)

## ensure latest (retrieved) ss-config build matches current ss-update build ##
if [[ "${SS_BUILD_LATEST}" != "${SS_UPDATE_CONFIG_BUILD}" ]]; then
    ss_rm "${TMP_SS_CONFIG}"
    ss_echo "${LIGHTRED}Exiting ss-update-config: There is a version mismatch between this script and public mirrors... ${NOCOLOR}"
    exit 1
fi

I printed out the variables and got

batman@template:/var/www$ sudo ./ss-update-config
Running ss-update-config... 
SS_BUILD_LATEST=JAN2023A
SS_UPDATE_CONFIG_BUILD=FEB2023B
Exiting ss-update-config: There is a version mismatch between this script and public mirrors... 

So it seems like SS_BUILD_LATEST is not being update properly because in the mirror

https://mirrors.slickstack.io/bash/ss-config-sample.txt

SS_BUILD="FEB2023B"

I removed the line that deletes ss-config and got an empty file

batman@template:/var/www$ sudo ./ss-update-config
Running ss-update-config... 
Exiting ss-update-config: There is a version mismatch between this script and public mirrors... 
batman@template:/var/www$ sudo cat /tmp/ss-config 
batman@template:/var/www$ 

wget works

batman@template:/var/www$ sudo wget https://mirrors.slickstack.io/bash/ss-config-sample.txt -O /tmp/ss-config
--2023-02-08 21:04:38--  https://mirrors.slickstack.io/bash/ss-config-sample.txt
Resolving mirrors.slickstack.io (mirrors.slickstack.io)... 172.67.169.13, 104.21.27.74, 2606:4700:3037::6815:1b4a, ...
Connecting to mirrors.slickstack.io (mirrors.slickstack.io)|172.67.169.13|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘/tmp/ss-config’

/tmp/ss-config                                                  [ <=>                                                                                                                                     ]  42.15K  --.-KB/s    in 0.002s  

2023-02-08 21:04:39 (21.4 MB/s) - ‘/tmp/ss-config’ saved [43166]

batman@template:/var/www$ head -n 30 /tmp/ss-config 
#!/bin/bash

####################################################################################################
#### author: SlickStack ############################################################################
#### link: https://slickstack.io ###################################################################
#### mirror: https://mirrors.slickstack.io/bash/ss-config-sample.txt ###############################
#### path: /var/www/ss-config-sample (for reference only) ##########################################
#### destination: /var/www/ss-config (can be configured by ss-install wizard or manually) ##########
#### purpose: SlickStack configuration file boilerplate ############################################
#### module version: Ubuntu 22.04 LTS ##############################################################
#### bash aliases: n/a (ss status) #################################################################
####################################################################################################

## TO UPDATE SS-CONFIG TO LATEST BOILERPLATE RUN SS-UPDATE-CONFIG (SETTINGS RETAINED) ##
## AFTER CHANGING ANY SS-CONFIG SETTINGS BELOW YOU MUST RUN SS-INSTALL AGAIN ##

####################################################################################################
#### SS-Config: Build Version ######################################################################
####################################################################################################

## run ss-update-config if outdated (check the public mirror link for current build) ##
## lockdown option prevents automatic updates of SlickStack scripts and config ##

SS_BUILD="FEB2023B"
SS_LOCKDOWN="false" ## limited functionality

GITHUB_TOKEN="" ## https://github.com/settings/tokens/new ... not yet integrated with SS

####################################################################################################
#### SS-Config: Access Settings ####################################################################

What is the idea around this part of the code?

jessuppi commented 1 year ago

Hey @kidharb

This is expected behavior when your ss-update-config script is outdated and hasn't yet updated itself via ss-check with the latest version, so it will refuse to update your ss-config to latest boilerplate until they are in sync.

If we have recently pushed an update, you might see this message for a few minutes.

Just try again later, you can also run ss-check a few times to hurry it up.