diff --git a/_start.sh b/_start.sh new file mode 100644 index 0000000..8e6f333 --- /dev/null +++ b/_start.sh @@ -0,0 +1,3 @@ +python collect.py & +python retrieve.py & +python scrape.py & diff --git a/start.py b/start.py new file mode 100644 index 0000000..b306687 --- /dev/null +++ b/start.py @@ -0,0 +1,25 @@ +import sys +errors = False + +try: + import zmq +except ImportError, e: + sys.stderr.write("You are missing ZeroMQ; `pip install pyzmq`\n") + errors = True + +try: + import zmq +except ImportError, e: + sys.stderr.write("You are missing msgpack; `pip install msgpack-python`\n") + errors = True + +try: + import zmq +except ImportError, e: + sys.stderr.write("You are missing requests; `pip install requests`\n") + errors = True + +if errors == False: + subprocess.call(["/bin/sh", "_start.sh"]) + + sys.stdout.write("pastebin-scrape is now running. Run `python retrieve.py` to add additional retrieval workers.\n")