mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-30 13:23:28 +00:00
25 lines
847 B
Python
Executable File
25 lines
847 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
# Entry-point for running from the CLI when not installed via Pip, Pip will handle the console_scripts entry_points's from setup.py
|
|
# It's recommended to use `pip3 install changedetection.io` and start with `changedetection.py` instead, it will be linkd to your global path.
|
|
# or Docker.
|
|
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
|
|
|
|
from changedetectionio import changedetection
|
|
import multiprocessing
|
|
|
|
if __name__ == '__main__':
|
|
|
|
parse_process = multiprocessing.Process(target=changedetection.main)
|
|
parse_process.daemon = True
|
|
parse_process.start()
|
|
import time
|
|
|
|
try:
|
|
while True:
|
|
time.sleep(1)
|
|
|
|
except KeyboardInterrupt:
|
|
#parse_process.terminate() not needed, because this process will issue it to the sub-process anyway
|
|
print ("Exited - CTRL+C")
|