Rename sshyp-shear.py to sshyp-remote.py for future intentions

This commit is contained in:
2022-02-16 09:15:33 -05:00
parent 607a4709f6
commit 73128665fb
2 changed files with 3 additions and 3 deletions
+3 -3
View File
@@ -61,7 +61,7 @@ def tweak(): # runs configuration wizard
open(path.expanduser('~/.config/sshyp/sshyp-device'), 'w').write(_device_type) open(path.expanduser('~/.config/sshyp/sshyp-device'), 'w').write(_device_type)
Path(path.expanduser('~/.config/sshyp/deleted')).mkdir(0o700, parents=True, exist_ok=True) Path(path.expanduser('~/.config/sshyp/deleted')).mkdir(0o700, parents=True, exist_ok=True)
copy('/usr/bin/sshync.py', path.expanduser('~/')) copy('/usr/bin/sshync.py', path.expanduser('~/'))
copy('/usr/bin/sshyp-shear.py', path.expanduser('~/shear.py')) copy('/usr/bin/sshyp-remote.py', path.expanduser('~/sshyp-remote.py'))
print('\nMake sure the ssh service is running and properly configured.\n\nConfiguration complete!\n') print('\nMake sure the ssh service is running and properly configured.\n\nConfiguration complete!\n')
s_exit() s_exit()
else: else:
@@ -210,7 +210,7 @@ def read_shortcut(): # shortcut to quickly read an entry
def sync(): # calls sshync to sync changes to the user's server def sync(): # calls sshync to sync changes to the user's server
print('\nSyncing entries with the server device...\n') print('\nSyncing entries with the server device...\n')
# check for deletions # check for deletions
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"python -c 'import shear" system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"python -c 'import sshyp_remote"
f"; shear.check(\"'\"{client_device_name}\"'\")'\"") f"; shear.check(\"'\"{client_device_name}\"'\")'\"")
system(f"sftp -p -q -i '{path.expanduser('~/.ssh/sshyp')}' -P {port} {username_ssh}@{ip}:" system(f"sftp -p -q -i '{path.expanduser('~/.ssh/sshyp')}' -P {port} {username_ssh}@{ip}:"
f"'/home/{username_ssh}/.config/sshyp/deletion_database' {path.expanduser('~/.config/sshyp/')}") f"'/home/{username_ssh}/.config/sshyp/deletion_database' {path.expanduser('~/.config/sshyp/')}")
@@ -416,7 +416,7 @@ def remove_data(): # deletes an entry from the server and flags it for local de
except FileNotFoundError: except FileNotFoundError:
print('\nAccess denied.\n') print('\nAccess denied.\n')
s_exit() s_exit()
system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"python -c 'import shear" system(f"ssh -i '{path.expanduser('~/.ssh/sshyp')}' -p {port} {username_ssh}@{ip} \"python -c 'import sshyp_remote"
f"; shear.delete(\"'\"{_entry_name}\"'\")'\"") f"; shear.delete(\"'\"{_entry_name}\"'\")'\"")