23 lines
643 B
Python
23 lines
643 B
Python
import os
|
|
from config import * # pylint: disable=wildcard-import,unused-wildcard-import
|
|
|
|
def launch():
|
|
for dirname in all_dirs:
|
|
if not os.path.isdir(dirname):
|
|
os.mkdir(dirname)
|
|
|
|
if os.fork() == 0:
|
|
f = open(logfile, 'a')
|
|
os.close(0)
|
|
os.dup2(f.fileno(), 1)
|
|
os.dup2(f.fileno(), 2)
|
|
os.execlp('python', 'python', '-m', 'chopy',
|
|
'--output_dir', split_dir,
|
|
'--monitor', monitor_dir,
|
|
'--database', database,
|
|
'--index_dir', index_dir,
|
|
'--filter_dir', filter_dir)
|
|
|
|
if __name__ == '__main__':
|
|
launch()
|