mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Re-implemented quick-unlock tutorial
Former-commit-id: 30d7e1498a18409892403e580aaa16bf05fde40d Former-commit-id: 6675cb6185ddd58f57b6b9114a18d1ccb1e7f911
This commit is contained in:
+10
-2
@@ -199,7 +199,9 @@ def quick_unlock_config(_default):
|
|||||||
if _default:
|
if _default:
|
||||||
_enabled = 'false'
|
_enabled = 'false'
|
||||||
else:
|
else:
|
||||||
_quick_unlock_sel = curses_radio(('yes', 'no'), 'enable quick-unlock?')
|
_quick_unlock_sel = curses_radio(('yes', 'no'), 'enable quick-unlock?\n\n\n\n\nquick-unlock allows you to use '
|
||||||
|
'a shorter version of your gpg key passphrase and\nrequires a '
|
||||||
|
'constant connection to your sshyp server to authenticate')
|
||||||
if _quick_unlock_sel == 0:
|
if _quick_unlock_sel == 0:
|
||||||
_enabled = 'true'
|
_enabled = 'true'
|
||||||
else:
|
else:
|
||||||
@@ -208,6 +210,7 @@ def quick_unlock_config(_default):
|
|||||||
sshyp_data.add_section('CLIENT-ONLINE')
|
sshyp_data.add_section('CLIENT-ONLINE')
|
||||||
sshyp_data.set('CLIENT-ONLINE', 'quick_unlock_enabled', _enabled)
|
sshyp_data.set('CLIENT-ONLINE', 'quick_unlock_enabled', _enabled)
|
||||||
write_config()
|
write_config()
|
||||||
|
return _enabled
|
||||||
|
|
||||||
|
|
||||||
# runs secondary configuration menu
|
# runs secondary configuration menu
|
||||||
@@ -250,7 +253,12 @@ def global_menu(_post_setup):
|
|||||||
elif _choice == 4:
|
elif _choice == 4:
|
||||||
editor_config(False)
|
editor_config(False)
|
||||||
elif _choice == 5:
|
elif _choice == 5:
|
||||||
quick_unlock_config(False)
|
_enabled = quick_unlock_config(False)
|
||||||
|
if _enabled == 'true':
|
||||||
|
_term_message = ("\nquick-unlock has been enabled client-side - in order for this feature to function,"
|
||||||
|
"\nyou must first log in to the sshyp server and run:\n\nsshyp whitelist setup (if not"
|
||||||
|
" already done)\nsshyp whitelist add "
|
||||||
|
f"'{listdir(f'{home}/.config/sshyp/devices')[0].rstrip()}'\n")
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
curses_terminate(_term_message)
|
curses_terminate(_term_message)
|
||||||
|
|||||||
Reference in New Issue
Block a user