Remove keyserver key
This commit is contained in:
parent
0607a26ea8
commit
4cdef1e0b4
|
@ -437,6 +437,25 @@ function keyserver_edit {
|
||||||
systemctl restart sks
|
systemctl restart sks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function keyserver_remove_key {
|
||||||
|
data=$(tempfile 2>/dev/null)
|
||||||
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
|
dialog --title $"Remove a key" \
|
||||||
|
--backtitle $"Freedombone Control Panel" \
|
||||||
|
--inputbox $"Enter the ID of the key which you wish to remove:" 12 60 2>$data
|
||||||
|
sel=$?
|
||||||
|
case $sel in
|
||||||
|
0)
|
||||||
|
remove_key_id=$(<$data)
|
||||||
|
if [ ${#remove_key_id} -gt 8 ]; then
|
||||||
|
sks drop $remove_key_id
|
||||||
|
dialog --title $"Remove a key" \
|
||||||
|
--msgbox $"The key was removed" 6 40
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
function configure_interactive_keyserver {
|
function configure_interactive_keyserver {
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
@ -444,19 +463,21 @@ function configure_interactive_keyserver {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title $"SKS Keyserver" \
|
--title $"SKS Keyserver" \
|
||||||
--radiolist $"Choose an operation:" 11 70 3 \
|
--radiolist $"Choose an operation:" 12 70 4 \
|
||||||
1 $"Sync with other keyserver" off \
|
1 $"Remove a key" off \
|
||||||
2 $"Edit sync keyservers" off \
|
2 $"Sync with other keyserver" off \
|
||||||
3 $"Exit" on 2> $data
|
3 $"Edit sync keyservers" off \
|
||||||
|
4 $"Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
1) return;;
|
||||||
255) return;;
|
255) return;;
|
||||||
esac
|
esac
|
||||||
case $(cat $data) in
|
case $(cat $data) in
|
||||||
1) keyserver_sync;;
|
1) keyserver_remove_key;;
|
||||||
2) keyserver_edit;;
|
2) keyserver_sync;;
|
||||||
3) break;;
|
3) keyserver_edit;;
|
||||||
|
4) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue