add "primary" argument for installing a primary server
parent
ef1274b227
commit
17d83616a9
13
install
13
install
|
@ -2,16 +2,16 @@
|
||||||
CRONICLE_DIR=$(dirname "$(realpath "$BASH_SOURCE")")
|
CRONICLE_DIR=$(dirname "$(realpath "$BASH_SOURCE")")
|
||||||
unset CRONICLE_UPGRADE
|
unset CRONICLE_UPGRADE
|
||||||
if [[ $1 == "upgrade" ]]; then CRONICLE_UPGRADE=true; shift; fi
|
if [[ $1 == "upgrade" ]]; then CRONICLE_UPGRADE=true; shift; fi
|
||||||
pushd $CRONICLE_DIR
|
pushd "$CRONICLE_DIR" || exit
|
||||||
if [[ ! -d bin ]] || [[ $CRONICLE_UPGRADE ]] ; then
|
if [[ ! -d bin ]] || [[ $CRONICLE_UPGRADE ]] ; then
|
||||||
if [[ ! -d $CRONICLE_DIR/cronicle-edge ]]; then
|
if [[ ! -d $CRONICLE_DIR/cronicle-edge ]]; then
|
||||||
git clone https://github.com/cronicle-edge/cronicle-edge.git
|
git clone https://github.com/cronicle-edge/cronicle-edge.git
|
||||||
fi
|
fi
|
||||||
pushd cronicle-edge
|
pushd cronicle-edge || exit
|
||||||
git pull origin main
|
git pull origin main
|
||||||
npm package update
|
npm package update
|
||||||
./bundle "$@" $CRONICLE_DIR -f
|
./bundle "$@" "$CRONICLE_DIR" -f
|
||||||
popd
|
popd || exit
|
||||||
if [[ ! -d "nodejs" ]]; then
|
if [[ ! -d "nodejs" ]]; then
|
||||||
echo "installing nodejs for cronicle"
|
echo "installing nodejs for cronicle"
|
||||||
bash bin/getnode.sh
|
bash bin/getnode.sh
|
||||||
|
@ -24,7 +24,8 @@ sed 's|@BINDIR@|'"$CRONICLE_DIR"'/bin|g' cronicle.service.tpl | sed 's|@CDIR@|'"
|
||||||
# ls -la /etc/systemd/system | grep cronicle
|
# ls -la /etc/systemd/system | grep cronicle
|
||||||
# cat /etc/systemd/system/cronicle.service
|
# cat /etc/systemd/system/cronicle.service
|
||||||
# fi
|
# fi
|
||||||
if [[ ! -d data ]]; then
|
if [[ ! -d data ]] && [[ $1 == "primary" ]]; then
|
||||||
|
echo "installing as cronicle primary server"
|
||||||
bash control setup
|
bash control setup
|
||||||
fi
|
fi
|
||||||
# ln -s $CRONICLE_DIR/conf/ $CRONICLE_DIR/dist
|
# ln -s $CRONICLE_DIR/conf/ $CRONICLE_DIR/dist
|
||||||
|
@ -32,4 +33,4 @@ fi
|
||||||
# ln -s $CRONICLE_DIR/logs/ $CRONICLE_DIR/dist/
|
# ln -s $CRONICLE_DIR/logs/ $CRONICLE_DIR/dist/
|
||||||
# mkdir $CRONICLE_DIR/data/
|
# mkdir $CRONICLE_DIR/data/
|
||||||
# ln -s $CRONICLE_DIR/data/ $CRONICLE_DIR/dist/
|
# ln -s $CRONICLE_DIR/data/ $CRONICLE_DIR/dist/
|
||||||
popd
|
popd || exit
|
Loading…
Reference in New Issue