mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 08:37:14 -04:00
Fixed lock file not being generated in gpg setup
Former-commit-id: b9183ff7665bcc323ddcd9a59301b617794c0f79 Former-commit-id: fe1bab1c080ef4a1a9cf29a81c0e58c4e1b9fc4f
This commit is contained in:
+6
-6
@@ -126,12 +126,12 @@ def gpg_config():
|
|||||||
remove(f"{home}/.config/sshyp/gpg-gen")
|
remove(f"{home}/.config/sshyp/gpg-gen")
|
||||||
_gpg_id = run(['gpg', '-k'], stdout=PIPE, text=True).stdout.splitlines()[-3].strip()
|
_gpg_id = run(['gpg', '-k'], stdout=PIPE, text=True).stdout.splitlines()[-3].strip()
|
||||||
|
|
||||||
# lock file generation
|
# lock file generation
|
||||||
if isfile(f"{home}/.config/sshyp/lock.gpg"):
|
if isfile(f"{home}/.config/sshyp/lock.gpg"):
|
||||||
remove(f"{home}/.config/sshyp/lock.gpg")
|
remove(f"{home}/.config/sshyp/lock.gpg")
|
||||||
open(f"{home}/.config/sshyp/lock", 'w')
|
open(f"{home}/.config/sshyp/lock", 'w')
|
||||||
run(['gpg', '-qr', _gpg_id, '-e', f"{home}/.config/sshyp/lock"])
|
run(['gpg', '-qr', _gpg_id, '-e', f"{home}/.config/sshyp/lock"])
|
||||||
remove(f"{home}/.config/sshyp/lock")
|
remove(f"{home}/.config/sshyp/lock")
|
||||||
|
|
||||||
if not sshyp_data.has_section('CLIENT-GENERAL'):
|
if not sshyp_data.has_section('CLIENT-GENERAL'):
|
||||||
sshyp_data.add_section('CLIENT-GENERAL')
|
sshyp_data.add_section('CLIENT-GENERAL')
|
||||||
|
|||||||
Reference in New Issue
Block a user