Skip to content
Snippets Groups Projects
Commit 115c2dbe authored by Tomáš Čejka's avatar Tomáš Čejka
Browse files

improve srcdir discovery, start redis in runfod.sh

parent 020aefb4
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,22 @@ virtualenv-3 /srv/venv ...@@ -25,7 +25,22 @@ virtualenv-3 /srv/venv
( (
source /srv/venv/bin/activate source /srv/venv/bin/activate
mkdir -p /srv/flowspy/ mkdir -p /srv/flowspy/
cp -r "`dirname $0`"/* /srv/flowspy/
# Select source dir and copy FoD into /srv/flowspy/
if [ "`basename "$0"`" = install-centos.sh ]; then
# this script is in the source directory
cp -r "`dirname $0`"/* /srv/flowspy/
elif [ -e /vagrant ]; then
# vagrant's copy in /vagrant/
cp -r /vagrant/* /srv/flowspy/
elif [ -e ./install-centos.sh ]; then
# current directory is with the sourcecode
cp -r ./* /srv/flowspy/
else
echo "Could not find FoD src directory tried `dirname $0`, /vagrant/, ./"
exit 1
fi
cd /srv/flowspy/ cd /srv/flowspy/
( (
cd flowspy cd flowspy
......
...@@ -16,16 +16,19 @@ fi ...@@ -16,16 +16,19 @@ fi
cd "$(dirname "$0")" cd "$(dirname "$0")"
if [ ! -x ./fodcli_db_is_mysql ] || ./fodcli_db_is_mysql; then #if [ ! -x ./fodcli_db_is_mysql ] || ./fodcli_db_is_mysql; then
echo "Starting DB services FoD might be depending on (depending on its config): mysql" 1>&2 # echo "Starting DB services FoD might be depending on (depending on its config): mysql" 1>&2
systemctl start mysql.service # systemctl start mysql.service
fi #fi
# hook to initiallize (without any user interaction admin user and its peer data) # hook to initiallize (without any user interaction admin user and its peer data)
[ -x ./fodcli_insert_basic_data.sh ] && ./fodcli_insert_basic_data.sh [ -x ./fodcli_insert_basic_data.sh ] && ./fodcli_insert_basic_data.sh
mkdir -p /var/run/fod mkdir -p /var/run/fod
echo "starting redis" 1>&2
/usr/bin/redis-server &
echo "Starting FoD celeryd in background" 1>&2 echo "Starting FoD celeryd in background" 1>&2
celery worker -A flowspy --concurrency=2 --detach -l debug -f celery.log celery worker -A flowspy --concurrency=2 --detach -l debug -f celery.log
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment