mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
Add conditional startDemo.sh, only initializes if var not found
This commit is contained in:
parent
93ee7b534a
commit
52d424b332
34
startDemo.sh
34
startDemo.sh
@ -1,20 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mkdir ./var
|
if [ -d './var' ]; then
|
||||||
cd ./var
|
echo 'Directory ./var already exists! Skipping initialization.'
|
||||||
|
./cc-backend --server --dev
|
||||||
|
else
|
||||||
|
mkdir ./var
|
||||||
|
cd ./var
|
||||||
|
|
||||||
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive-dev.tar.xz
|
wget https://hpc-mover.rrze.uni-erlangen.de/HPC-Data/0x7b58aefb/eig7ahyo6fo2bais0ephuf2aitohv1ai/job-archive-dev.tar.xz
|
||||||
tar xJf job-archive.tar.xz
|
tar xJf job-archive-dev.tar.xz
|
||||||
rm ./job-archive.tar.xz
|
rm ./job-archive-dev.tar.xz
|
||||||
|
|
||||||
touch ./job.db
|
touch ./job.db
|
||||||
cd ../web/frontend
|
cd ../web/frontend
|
||||||
yarn install
|
yarn install
|
||||||
yarn build
|
yarn build
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
cp ./configs/env-template.txt .env
|
cp ./configs/env-template.txt .env
|
||||||
cp ./docs/config.json config.json
|
cp ./docs/config.json config.json
|
||||||
go build ./cmd/cc-backend
|
go build ./cmd/cc-backend
|
||||||
|
|
||||||
|
./cc-backend --server --dev --init-db --add-user demo:admin:AdminDev
|
||||||
|
fi
|
||||||
|
|
||||||
./cc-backend --server --dev --init-db --add-user demo:admin:AdminDev
|
|
Loading…
Reference in New Issue
Block a user