Update setup.py

Signed-off-by: jayofelony <oudshoorn.jeroen@gmail.com>
This commit is contained in:
jayofelony
2024-03-23 09:46:32 +01:00
parent afb1d11cd8
commit 18fb956251

View File

@ -16,7 +16,10 @@ log = logging.getLogger(__name__)
def install_file(source_filename, dest_filename): def install_file(source_filename, dest_filename):
# do not overwrite network configuration if it exists already # do not overwrite network configuration if it exists already
# https://github.com/evilsocket/pwnagotchi/issues/483 # https://github.com/evilsocket/pwnagotchi/issues/483
if dest_filename.startswith('/etc/network/interfaces.d/') and dest_filename.startswith('/root/') and os.path.exists(dest_filename): if dest_filename.startswith('/etc/network/interfaces.d/') and os.path.exists(dest_filename):
log.info(f"{dest_filename} exists, skipping ...")
return
elif dest_filename.startswith('/root/') and os.path.exists(dest_filename):
log.info(f"{dest_filename} exists, skipping ...") log.info(f"{dest_filename} exists, skipping ...")
return return