littlebizzy / slickstack

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

ss-update-config adds data for SS_PILOT_FILE and MU plugins #132

Closed voidxd closed 2 years ago

voidxd commented 2 years ago

Hi!

After editing the ss-config file and running ss-install it sometimes says Exiting ss-install: Please run ss-update-config since your ss-config is outdated and try again...

After running it, the ss-config has some edits overwritten:

1) I had disabled some MU plugins at the end of the file by commenting them out. After running ss-update-config the lines were uncommented, which leads to the MU plugins being installed and activate again.

2) When setting up SlickStack, it says to leave the SS_PILOT_FILE blank, if you don't have one. There is some input there by default, but I deleted it and left the field blank. After running ss-update-config it gets filled back in as SS_PILOT_FILE="@SS_PILOT_FILE" and you can't run ss-install because it detects "@ and determines you still have placeholders left. I edited the field and left it blank and now it's working.

How would you go about this?

jessuppi commented 2 years ago

Thanks for the detailed report @voidxd

It looks like we might need more intuitive find/replace in our ss-update-config script to avoid un-commenting lines that are commented maybe... but also, I think the original idea for customizing MU plugins was to simply remove the ones that you don't want to install rather than commenting the lines out. In other words I don't think we ever imagined ss-config variables to be commented out because we assume they are "required" variables.

We also might need a "cleanup" snippet at the end of that script to find/delete any @ PLACEHOLDERS

The reason this is happening in your case is since the variable is blank (null value) then the copying over of that value is therefore skipped by the script, and you wind up having the new boilerplate default value.

voidxd commented 2 years ago

Understood. Thank you very much.

For now I'll remove the lines containing MU plugins that I don't want installed, and will just leave the default value for the SS_PILOT_FILE.

jessuppi commented 2 years ago

For now we added this warning to ss-config in the MU plugins section:

## TO DISABLE ANY OF THE MU PLUGINS BELOW SIMPLY DELETE THE RELEVANT LINES FROM SS-CONFIG ##

Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-config-sample.txt

Also, we have a new section at the bottom of ss-update-config for replacing any placeholders:

####################################################################################################
#### K. SS-Update-Config: Replace SS-Config Placeholders (If Exist) ################################
####################################################################################################

## here we manually replace any remaining placeholders in ss-config to avoid conflicts ##
## this ensures a default value exists in case none has ever been specified ##

Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-update-config.txt

Lastly, by default the SS_PILOT_FILE value will be made blank (deleted) during the ss-install setup wizard going forward, unless that prompt is filled out with a link, so that should help avoid some confusion hopefully. Thanks!