mirror of https://github.com/CIRCL/AIL-framework
Update config
Make all paths in the config file relative to the home directory.pull/20/head
parent
a68f5b6a0e
commit
50cfac857e
|
@ -67,7 +67,7 @@ if __name__ == "__main__":
|
|||
time.sleep(10)
|
||||
continue
|
||||
# Creating the full filepath
|
||||
filename = os.path.join(os.environ('AIL_BIN'),
|
||||
filename = os.path.join(os.environ('AIL_HOME'),
|
||||
h.config.get("Directories", "pastes"), paste)
|
||||
dirname = os.path.dirname(filename)
|
||||
if not os.path.exists(dirname):
|
||||
|
|
|
@ -27,6 +27,7 @@ import time
|
|||
from packages import Paste
|
||||
from pubsublogger import publisher
|
||||
from packages import lib_words
|
||||
import os
|
||||
|
||||
import Helper
|
||||
|
||||
|
@ -52,8 +53,10 @@ if __name__ == "__main__":
|
|||
publisher.info("Script Curve subscribed to {}".format(h.sub_channel))
|
||||
|
||||
# FILE CURVE SECTION #
|
||||
csv_path = h.config.get("Directories", "wordtrending_csv")
|
||||
wordfile_path = h.config.get("Directories", "wordsfile")
|
||||
csv_path = os.path.join(os.environ('AIL_HOME'),
|
||||
h.config.get("Directories", "wordtrending_csv"))
|
||||
wordfile_path = os.path.join(os.environ('AIL_HOME'),
|
||||
h.config.get("Directories", "wordsfile"))
|
||||
|
||||
message = h.redis_rpop()
|
||||
prec_filename = None
|
||||
|
|
|
@ -54,7 +54,7 @@ if __name__ == "__main__":
|
|||
h.config.get("PubSub_Global", "channel")))
|
||||
|
||||
set_limit = 100
|
||||
bloompath = os.path.join(os.environ('AIL_BIN'),
|
||||
bloompath = os.path.join(os.environ('AIL_HOME'),
|
||||
h.config.get("Directories", "bloomfilters"))
|
||||
|
||||
bloop_path_set = set()
|
||||
|
|
|
@ -27,7 +27,7 @@ cfg = ConfigParser.ConfigParser()
|
|||
cfg.read(configfile)
|
||||
|
||||
# Indexer configuration - index dir and schema setup
|
||||
indexpath = cfg.get("Indexer", "path")
|
||||
indexpath = os.path.join(os.environ('AIL_HOME'), cfg.get("Indexer", "path"))
|
||||
indexertype = cfg.get("Indexer", "type")
|
||||
|
||||
argParser = argparse.ArgumentParser(description='Fulltext search for AIL')
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Directories]
|
||||
bloomfilters = /home/user/Blooms/
|
||||
bloomfilters = Blooms
|
||||
pastes = PASTES
|
||||
wordtrending_csv = /home/user/AIL/var/www/static/csv/wordstrendingdata
|
||||
wordsfile = /home/user/AIL/files/wordfile
|
||||
wordtrending_csv = var/www/static/csv/wordstrendingdata
|
||||
wordsfile = files/wordfile
|
||||
|
||||
##### Redis #####
|
||||
[Redis_Cache]
|
||||
|
@ -70,4 +70,4 @@ cc_critical = DE
|
|||
# Indexer configuration
|
||||
[Indexer]
|
||||
type = whoosh
|
||||
path = /home/user/indexdir
|
||||
path = indexdir
|
||||
|
|
Loading…
Reference in New Issue