Commit 0ff6cd3 1 parent da6baee commit 0ff6cd3 Copy full SHA for 0ff6cd3
File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 34
34
fi
35
35
36
36
# 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
37
44
if [ " $REPO " = ' http://archive.ubuntu.com/ubuntu' ]
38
45
then
39
46
MIRROR_SWITCH=" ON"
45
52
if [ -f " $SCRIPTS /wordpress-startup-script.sh" ]
46
53
then
47
54
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.
49
56
50
57
The script is smart, and have already pre-selected the values that you'd want to change based on the current settings."
51
58
fi
@@ -56,7 +63,7 @@ choice=$(whiptail --title "$TITLE" --checklist \
56
63
$CHECKLIST_GUIDE \n\n$RUN_LATER_GUIDE " " $WT_HEIGHT " " $WT_WIDTH " 4 \
57
64
" Keyboard Layout" " (Change the keyboard layout from '$KEYBOARD_LAYOUT ')" " $KEYBOARD_LAYOUT_SWITCH " \
58
65
" 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 )
60
67
61
68
case " $choice " in
62
69
* " Keyboard Layout" * )
You can’t perform that action at this time.
0 commit comments