Skip to content

Commit f764ada

Browse files
committed
Merge branch 'master' of github.com:ail-project/ail-framework
2 parents 4928577 + 556d10f commit f764ada

File tree

4 files changed

+31
-21
lines changed

4 files changed

+31
-21
lines changed

bin/LAUNCH.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ function launching_kvrocks {
114114
echo -e $GREEN"\t* Launching KVROCKS servers"$DEFAULT
115115

116116
sleep 0.1
117-
screen -S "KVROCKS_AIL" -X screen -t "6383" bash -c 'cd '${AIL_HOME}'; ./kvrocks/build/kvrocks -c '$conf_dir'/6383.conf ; read x'
117+
if [ -f "./kvrocks/build/kvrocks" ]; then
118+
screen -S "KVROCKS_AIL" -X screen -t "6383" bash -c 'cd '${AIL_HOME}'; ./kvrocks/build/kvrocks -c '$conf_dir'/6383.conf ; read x'
119+
elif [ -f "/usr/bin/kvrocks" ]; then
120+
screen -S "KVROCKS_AIL" -X screen -t "6383" bash -c 'cd '${AIL_HOME}'; kvrocks -c '$conf_dir'/6383.conf ; read x'
121+
else
122+
echo -e $RED"\t* KVROCKS is not installed."$DEFAULT
123+
fi
118124
}
119125

120126
function launching_logs {

installing_deps.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ make
7171
sudo make install
7272
popd
7373

74+
# Yara
75+
YARA_VERSION="4.3.0"
76+
mkdir yara_temp
77+
wget https://github.com/VirusTotal/yara/archive/v${YARA_VERSION}.zip -O yara_temp/yara.zip
78+
unzip yara_temp/yara.zip -d yara_temp/
79+
pushd yara_temp/yara-${YARA_VERSION}
80+
./bootstrap.sh
81+
./configure
82+
make
83+
sudo make install
84+
make check
85+
popd
86+
rm -rf yara_temp
87+
88+
7489
# ARDB #
7590
#test ! -d ardb/ && git clone https://github.com/ail-project/ardb.git
7691
#pushd ardb/

var/www/Flask_server.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,15 @@ def filter(self, record):
117117

118118
# ========= TLS =========#
119119

120-
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
121-
ssl_context.load_cert_chain(certfile=os.path.join(Flask_dir, 'server.crt'), keyfile=os.path.join(Flask_dir, 'server.key'))
122-
ssl_context.suppress_ragged_eofs = True
123-
# print(ssl_context.get_ciphers())
120+
ssl_context = None
121+
self_signed_certfile = os.path.join(Flask_dir, 'server.crt')
122+
self_signed_keyfile = os.path.join(Flask_dir, 'server.key')
123+
124+
if os.path.exists(self_signed_certfile) and os.path.exists(self_signed_keyfile):
125+
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
126+
ssl_context.load_cert_chain(certfile=self_signed_certfile, keyfile=self_signed_keyfile)
127+
ssl_context.suppress_ragged_eofs = True
128+
# print(ssl_context.get_ciphers())
124129
# ========= =========#
125130

126131
Flask_config.app = Flask(__name__, static_url_path=baseUrl+'/static/')

var/www/update_thirdparty.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,6 @@ unzip -qq temp/popper.zip -d temp/
7777
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js ./static/js/
7878
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js.map ./static/js/
7979

80-
81-
82-
83-
# INSTALL YARA
84-
YARA_VERSION="4.3.0"
85-
wget https://github.com/VirusTotal/yara/archive/v${YARA_VERSION}.zip -O temp/yara.zip
86-
unzip temp/yara.zip -d temp/
87-
pushd temp/yara-${YARA_VERSION}
88-
./bootstrap.sh
89-
./configure
90-
make
91-
sudo make install
92-
make check
93-
popd
94-
95-
9680
rm -rf temp
9781

9882
mkdir -p ./static/image

0 commit comments

Comments
 (0)