mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
fix: the auto-update plugin now also installs launchers and service files via setup.py (closes #470)
This commit is contained in:
26
setup.py
26
setup.py
@ -1,7 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
from setuptools import setup, find_packages
|
||||
import pwnagotchi
|
||||
import os
|
||||
import glob
|
||||
import shutil
|
||||
|
||||
setup_path = os.path.dirname(__file__)
|
||||
data_path = os.path.join(setup_path, "builder/data")
|
||||
|
||||
for source_filename in glob.glob("%s/**" % data_path, recursive=True):
|
||||
if os.path.isfile(source_filename):
|
||||
dest_filename = source_filename.replace(data_path, '')
|
||||
dest_folder = os.path.dirname(dest_filename)
|
||||
|
||||
print("installing %s to %s ..." % (source_filename, dest_filename))
|
||||
try:
|
||||
if not os.path.isdir(dest_folder):
|
||||
os.makedirs(dest_folder)
|
||||
|
||||
shutil.copyfile(source_filename, dest_filename)
|
||||
except Exception as e:
|
||||
print("error installing %s: %s" % (source_filename, e))
|
||||
|
||||
# reload systemd units
|
||||
os.system("systemctl daemon-reload")
|
||||
|
||||
required = []
|
||||
with open('requirements.txt') as fp:
|
||||
@ -10,6 +32,8 @@ with open('requirements.txt') as fp:
|
||||
if line != "":
|
||||
required.append(line)
|
||||
|
||||
import pwnagotchi
|
||||
|
||||
setup(name='pwnagotchi',
|
||||
version=pwnagotchi.version,
|
||||
description='(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFI pwning.',
|
||||
|
Reference in New Issue
Block a user