File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3434fi
3535
3636# Get the correct apt-mirror
37+ # Handle several sources
38+ FIND_SOURCES=" $( find /etc/apt/ -type f -name " *sources*" ) "
39+ for source in $FIND_SOURCES
40+ do
41+ REPO=$( grep " URIs:" " $source " | grep http | awk ' {print $2}' | head -1)
42+ done
43+ # Check if it matches
3744if [ " $REPO " = ' http://archive.ubuntu.com/ubuntu' ]
3845then
3946 MIRROR_SWITCH=" ON"
4552if [ -f " $SCRIPTS /wordpress-startup-script.sh" ]
4653then
4754 msg_box " Running a server, it's important that certain things are correct.
48- In the following menu you will be asked to setup the most basic stuff of your server.
55+ In the following menu you will be asked to set up the most basic stuff of your server.
4956
5057The script is smart, and have already pre-selected the values that you'd want to change based on the current settings."
5158fi
@@ -56,7 +63,7 @@ choice=$(whiptail --title "$TITLE" --checklist \
5663$CHECKLIST_GUIDE \n\n$RUN_LATER_GUIDE " " $WT_HEIGHT " " $WT_WIDTH " 4 \
5764" Keyboard Layout" " (Change the keyboard layout from '$KEYBOARD_LAYOUT ')" " $KEYBOARD_LAYOUT_SWITCH " \
5865" Timezone" " (Change the timezone from $( cat /etc/timezone) )" " $TIMEZONE_SWITCH " \
59- " Locate Mirror" " (Change the apt-mirror from $REPO )" OFF 3>&1 1>&2 2>&3 )
66+ " Locate Mirror" " (Change the apt repo for better download performance )" " $MIRROR_SWITCH " 3>&1 1>&2 2>&3 )
6067
6168case " $choice " in
6269 * " Keyboard Layout" * )
You can’t perform that action at this time.
0 commit comments