-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathstart_all.sh
More file actions
executable file
·62 lines (50 loc) · 1.51 KB
/
start_all.sh
File metadata and controls
executable file
·62 lines (50 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# this script should be run from freeeed_complete_pack
echo "******************** Starting FreeEed development services"
# Always run from this script's directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR" || exit 1
unset CATALINA_HOME
unset CATALINA_BASE
chmod -R 755 freeeed-tomcat
# Ensure logs directory exists
mkdir -p logs
cd freeeed-tomcat/bin;
./startup.sh &
cd ../..
echo "Starting Solr..."
cd freeeed-solr/example
nohup java -Xmx1024M -jar start.jar > ../../logs/solr.log 2>&1 &
cd ../..
if command -v flock > /dev/null; then
LOCK_BASE_DIR="${XDG_RUNTIME_DIR:-${TMPDIR:-$SCRIPT_DIR/logs}}"
mkdir -p "$LOCK_BASE_DIR" || exit 1
LOCK_FILE="$LOCK_BASE_DIR/tika.lock"
exec 9>"$LOCK_FILE" || exit 1
flock -n 9 || {
echo "Tika already started"
exit 0
}
else
echo "flock not found, skipping lock check..."
fi
echo "Starting Tika..."
cd freeeed-tika || exit 1
nohup java -Xmx1024M -jar tika-server.jar > ../logs/tika.log 2>&1 &
cd ..
cd FreeEed || exit 1
chmod +x freeeed_player.sh
./freeeed_player.sh &
cd "$SCRIPT_DIR" || exit 1
if [ -d "../python" ]; then
echo "Starting Python backend..."
cd ../python
if [ -f "myenv/bin/activate" ]; then
source myenv/bin/activate
exec python -m uvicorn main:app --reload
else
echo "Warning: Python virtual environment not found at ../python/myenv"
fi
else
echo "Warning: Python directory ../python not found. Python backend will not start."
fi