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
18ad18de
Commit
18ad18de
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Move database import to interactive
parent
19f431b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-keyserver
+42
-15
42 additions, 15 deletions
src/freedombone-app-keyserver
with
42 additions
and
15 deletions
src/freedombone-app-keyserver
+
42
−
15
View file @
18ad18de
...
...
@@ -143,9 +143,6 @@ function remove_keyserver {
function_check remove_ddns_domain
remove_ddns_domain
$KEYSERVER_DOMAIN_NAME
groupdel
-f
keyserver
userdel
-r
keyserver
remove_config_param KEYSERVER_DOMAIN_NAME
remove_config_param KEYSERVER_CODE
function_check remove_onion_service
...
...
@@ -159,6 +156,12 @@ function remove_keyserver {
if
[
-f
/usr/bin/keyserver-stop
]
;
then
rm
/usr/bin/keyserver-stop
fi
cd
$INSTALL_DIR
/keyserver
make uninstall
if
[
-d
/var/lib/sks
]
;
then
rm
-rf
/var/lib/sks
fi
rm
-rf
$INSTALL_DIR
/keyserver
groupdel
-f
keyserver
userdel
-r
keyserver
}
...
...
@@ -178,6 +181,42 @@ function install_interactive_keyserver {
APP_INSTALLED
=
1
}
function
keyserver_import_keys
{
if
[
!
-d
/var/lib/sks/dump
]
;
then
mkdir
-p
/var/lib/sks/dump
fi
cd
/var/lib/sks/dump
echo
$'Getting keyserver dump. This may take a few hours, so be patient.'
wget
-crp
-e
robots
=
off
--level
=
1
--cut-dirs
=
3
-nH
\
-A
pgp,txt
$KEYSERVER_DUMP_URL
cd
/var/lib/sks
echo
$'Building the keyserver database from the downloaded dump'
echo
'2'
| /usr/local/bin/sks_build.sh
}
function
configure_interactive_keyserver
{
while
true
do
data
=
$(
tempfile 2>/dev/null
)
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--backtitle
$"Freedombone Control Panel"
\
--title
$"SKS Keyserver"
\
--radiolist
$"Choose an operation:"
10 70 2
\
1
$"Import keys database"
off
\
2
$"Exit"
on 2>
$data
sel
=
$?
case
$sel
in
1
)
return
;;
255
)
return
;;
esac
case
$(
cat
$data
)
in
1
)
keyserver_import_keys
;;
2
)
break
;;
esac
done
}
function
install_keyserver
{
apt-get
-qy
install
build-essential gcc ocaml libdb-dev wget
...
...
@@ -279,18 +318,6 @@ function install_keyserver {
echo
''
>>
$sksconf_file
echo
'max_matches: 500'
>>
$sksconf_file
if
[
!
-d
/var/lib/sks/dump
]
;
then
mkdir
-p
/var/lib/sks/dump
fi
cd
/var/lib/sks/dump
echo
$'Getting keyserver dump. This may take a few hours, so be patient.'
wget
-crp
-e
robots
=
off
--level
=
1
--cut-dirs
=
3
-nH
\
-A
pgp,txt
$KEYSERVER_DUMP_URL
cd
/var/lib/sks
echo
$'Building the keyserver database from the downloaded dump'
echo
'2'
| /usr/local/bin/sks_build.sh
KEYSERVER_ONION_HOSTNAME
=
$(
add_onion_service keyserver 80
${
KEYSERVER_ONION_PORT
}
)
echo
'#!/bin/sh'
>
/usr/bin/keyserver-start
...
...
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