Przeglądaj źródła

Fixes

pull/21/head
pb 5 dni temu
rodzic
commit
ea922ebbfc
1 zmienionych plików z 17 dodań i 18 usunięć
  1. 17
    18
      i.lin.sh

+ 17
- 18
i.lin.sh Wyświetl plik

@@ -96,29 +96,28 @@ read rootfolder
if [ "$rootfolder" == "2" ]; then
ROOT=/var/chess/$INSTANCENAME/$INSTANCETYPE
else
ROOT=$(pwd) # Default to current directory if user chooses 1
echo $pwd
ROOT=./chess/production_A
fi

mkdir -p $ROOT
cd $ROOT
ROOT=$(realpath $ROOT)
sudo chown -R $USER:$USER $ROOT

# If ROOT is not the current directory, create the necessary directories and change to ROOT
# if [ "$ROOT" != "$(pwd)" ]; then
# sudo chown $USER:$USER $ROOT
# fi

# Change to ROOT directory
cd $ROOT || { echo "Failed to change to ROOT directory $ROOT"; exit 1; }
echo $PWD


wget -q -O - http://git.bbh/chess/elxr/raw/branch/master/centosinit.sh > $ROOT/centosinit.sh
sudo chmod u+x $ROOT/centosinit.sh
sh $ROOT/centosinit.sh


# If ROOT is not the current directory, create the necessary directories and change to ROOT
if [ "$ROOT" != "$(pwd)" ]; then
sudo mkdir -p /var/chess
sudo chown $USER:$USER /var/chess
mkdir -p /var/chess/$INSTANCENAME
sudo chown $USER:$USER /var/chess/$INSTANCENAME
mkdir -p $ROOT
sudo chown $USER:$USER $ROOT

# Change to ROOT directory
cd $ROOT || { echo "Failed to change to ROOT directory $ROOT"; exit 1; }
fi

# Platform-specific installation
if [ -f /etc/os-release ]; then
. /etc/os-release
@@ -262,7 +261,7 @@ git clone $REPOSERVER/$REPOOWNER/elxr.git
# Install npm dependencies and link
cd elxr
npm i
npm link
npm link --force
cd ..

sudo ln -s $ROOT/elxr/bin/elxr $(npm bin -g)/elxr
@@ -292,4 +291,4 @@ echo "Setup completed successfully!"
# ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'cihsr';
# FLUSH PRIVILEGES;

mysql -u root -p cihsr < cihsr_prod.sql
# mysql -u root -p cihsr < cihsr_prod.sql

Ładowanie…
Anuluj
Zapisz