Skip to content

Commit 5c49f64

Browse files
feat: execute init shell files in /opt/maxkb/local/init-shells when startup.
1 parent 5cd5fa9 commit 5c49f64

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

installer/start-maxkb.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,16 @@ fi
1111
mkdir -p /opt/maxkb/python-packages
1212

1313
rm -f /opt/maxkb-app/tmp/*
14+
15+
INIT_SHELL_DIR="/opt/maxkb/local/init-shells"
16+
if [ -d "$INIT_SHELL_DIR" ]; then
17+
find "$INIT_SHELL_DIR" -maxdepth 1 -type f -name "*.sh" | sort | while IFS= read -r f; do
18+
if bash "$f"; then
19+
echo "[OK] init-shell >>> $f"
20+
else
21+
echo "[ERROR] init-shell >>> $f failed with exit code $?" >&2
22+
fi
23+
done
24+
fi
25+
1426
python /opt/maxkb-app/main.py start

0 commit comments

Comments
 (0)