Added initial script for multi-client deletion

This commit is contained in:
2022-02-02 04:50:06 -05:00
parent d82c9b5e02
commit 3d7f08e43e
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/python3
# external modules
from os import remove, listdir
from os.path import expanduser
# utility functions
def delete(_file_path, _client_device_name):
remove(f"{expanduser('~/.password-pasture/')}{_file_path}")
for _device_name in listdir(expanduser('~/.config/sshyp/devices')):
open(f"{expanduser('~/.config/sshyp/deleted/')}{_file_path}.{_device_name}.del", 'w')
remove(f"{expanduser('~/.config/sshyp/deleted/')}{_file_path}.{_client_device_name}.del")