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
142c988c
Commit
142c988c
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidying
parent
6603cb49
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-installer
+47
-2
47 additions, 2 deletions
src/freedombone-installer
with
47 additions
and
2 deletions
src/freedombone-installer
+
47
−
2
View file @
142c988c
...
...
@@ -1177,12 +1177,28 @@ function after_setup_has_finished {
rm $webadmin_temp_password_file
fi
increment_install_progress
web_admin_onion_only
increment_install_progress
web_admin_create_users
increment_install_progress
web_admin_create_installed_apps
increment_install_progress
web_admin_create_add_apps
increment_install_progress
webadmin_update_version
increment_install_progress
if [ -d /etc/searx ]; then
# new searx secret
if [ -f "/etc/searx/searx/settings.yml" ]; then
...
...
@@ -1196,6 +1212,8 @@ function after_setup_has_finished {
systemctl restart searx
fi
increment_install_progress
# remove default user
if [ -d /home/fbone ]; then
userdel -r fbone
...
...
@@ -1204,13 +1222,19 @@ function after_setup_has_finished {
fi
fi
increment_install_progress
systemctl restart nginx
if [ -f $installer_script ]; then
rm $installer_script
fi
increment_install_progress
regenerate_blocklist
increment_install_progress
chown -R www-data:www-data "$webadmin_install_dir"
enable_webadmin_login
...
...
@@ -1313,14 +1337,17 @@ function remove_apps_from_webadmin {
}
function update_progress_bar {
if [ ! -f "$setup_file" ]; then
return
fi
# shellcheck disable=SC2086
if [ $install_state -
ne
$INSTALL_STATE_RUNNING_COMMAND ]; then
if [ $install_state -
gt
$INSTALL_STATE_RUNNING_COMMAND ]; then
return
fi
if [ ! -f /root/.install_counter ]; then
echo -n '1' > /root/.install_counter
fi
max_counter=2
7
6
max_counter=2
8
6
installing_page="$webadmin_install_dir/setup_installing.html"
progress_counter=$(cat /root/.install_counter)
progress_percent=$((progress_counter * 100 / max_counter))
...
...
@@ -1334,6 +1361,24 @@ function update_progress_bar {
sed -i "s|
<div
class=
\"w3-container.*|<div
class=
\"w3-container
w3-blue
w3-round-xlarge
\"
style=
\"width:${progress_percent}%\"
>
${progress_percent}%
</div>
|g" "$webadmin_install_dir/index.html"
}
function increment_install_progress {
install_comment=$"1"
if [ -f /root/.install_counter ]; then
install_counter=$(cat /root/.install_counter)
else
install_counter=0
fi
if [ "$install_comment" ]; then
echo "$install_comment" > /root/.install_comment
fi
install_counter=$((install_counter + 1))
echo -n "$install_counter" > /root/.install_counter
update_progress_bar
}
function initiate_automatic_backup {
backup_hour=3
if grep -q "BACKUP_HOUR=" "$CONFIGURATION_FILE"; then
...
...
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