Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
c4990d6b
Commit
c4990d6b
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Show progress bar during installation
parent
2b98db61
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-installer
+18
-5
18 additions, 5 deletions
src/freedombone-installer
src/freedombone-utils-depends
+8
-0
8 additions, 0 deletions
src/freedombone-utils-depends
webadmin/EN/setup_installing.html
+4
-0
4 additions, 0 deletions
webadmin/EN/setup_installing.html
with
30 additions
and
5 deletions
src/freedombone-installer
+
18
−
5
View file @
c4990d6b
...
...
@@ -149,11 +149,6 @@ function run_setup_command {
# run in a separate process
./
$installer_script
&
# Do the initial setup which includes email
#touch /root/.running_install_command
#/usr/local/bin/freedombone -c "$CONFIGURATION_FILE"
#rm /root/.running_install_command
}
function
before_setup_runs
{
...
...
@@ -295,6 +290,23 @@ function remove_apps_from_webadmin {
fi
}
function
update_progress_bar
{
if
[
!
-f
/root/.running_install_command
]
;
then
return
fi
if
[
!
-f
/root/.install_counter
]
;
then
return
fi
max_counter
=
50
installing_page
=
"
$webadmin_install_dir
/setup_installing.html"
progress_counter
=
$(
cat
/root/.install_counter
)
progress_percent
=
$((
progress_counter
*
max_counter
/
100
))
if
[
$progress_percent
-gt
100
]
;
then
progress_percent
=
100
fi
sed
-i
"s|<div class=
\"
w3-container|<div class=
\"
w3-container w3-round w3-blue
\"
style=
\"
width:
$progress_percent
%
\"
>
$progress_percent
%</div>|g"
"
$installing_page
"
}
if
[
-f
/root/.finished_install_command
]
;
then
rm
/root/.finished_install_command
fi
...
...
@@ -320,6 +332,7 @@ do
sleep
2
else
if
[
-f
"
$setup_file
"
]
;
then
update_progress_bar
before_setup_runs
after_setup_has_finished
sleep
1
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-utils-depends
+
8
−
0
View file @
c4990d6b
...
...
@@ -27,15 +27,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
function
increment_install_progress
{
if
[
!
-f
/root/.running_install_command
]
;
then
return
fi
install_comment
=
$"1"
if
[
!
"
$install_counter
"
]
;
then
install_counter
=
0
fi
if
[
!
"
$install_comment
"
]
;
then
echo
"
$install_comment
"
>
/root/.install_comment
fi
if
[
$install_counter
-lt
10000
]
;
then
install_counter
=
$((
install_counter
+
1
))
echo
-n
"
$install_counter
"
>
/root/.install_counter
fi
}
...
...
This diff is collapsed.
Click to expand it.
webadmin/EN/setup_installing.html
+
4
−
0
View file @
c4990d6b
...
...
@@ -67,5 +67,9 @@
<p>
This may take some time. We thank you for your patience.
</p>
</div>
<div
class=
"w3-light-grey w3-round"
>
<div
class=
"w3-container w3-round w3-blue"
style=
"width:0%"
>
0%
</div>
</div>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment