From 95f1dcf02e4d2a789c93801faf147eb99672f54f Mon Sep 17 00:00:00 2001 From: Dany LE Date: Mon, 3 Oct 2022 16:33:31 +0200 Subject: [PATCH] create tmp path for db --- antd-config.ini | 2 +- mkimg.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/antd-config.ini b/antd-config.ini index eae38ed..a769f65 100644 --- a/antd-config.ini +++ b/antd-config.ini @@ -4,7 +4,7 @@ plugins=./opt/www/lib/ plugins_ext=.so # These options can be changed tmpdir=/tmp/ -database=./ +database=/tmp/antos-db maxcon=500 backlog=5000 workers = 4 diff --git a/mkimg.sh b/mkimg.sh index 98713a2..aa2d1fe 100755 --- a/mkimg.sh +++ b/mkimg.sh @@ -49,11 +49,17 @@ B=$(dirname $0) cd $B [ ! -d "$W" ] && echo "$W is not a directory" && exit 1 # start antd-tunnel service -[ ! -f "$W/antd-config.ini" ] && cp ./opt/www/antd-config.ini $W/antd-config.ini +if[ ! -f "$W/antd-config.ini" ]; then + cp ./opt/www/antd-config.ini $W/antd-config.ini + mkdir -p $W/db + chmod 700 $W/db +fi [ ! -f "$W/runner.ini" ] && cp ./opt/www/runner.ini $W/runner.ini export LD_LIBRARY_PATH="$B/usr/lib/" echo "Runing Antd in $B with configuration $W/antd-config.ini" +# TODO this is not good touch /tmp/.antos_pkgcache +ln -sf $W/db /tmp/antos-db ./usr/bin/antd $W/antd-config.ini >/dev/null 2>&1 | ( sleep 2 && ./opt/www/bin/runner $W/runner.ini >/dev/null 2>&1 &) EOF