mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 05:43:41 -05:00
update the buggy install script
This commit is contained in:
parent
838167f5e3
commit
180ad0ddd7
1 changed files with 7 additions and 10 deletions
17
install.sh
17
install.sh
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
working_dir=~/tmp/catask
|
||||
working_dir=~/.local/share/catask
|
||||
bold=$(tput bold)
|
||||
normal=$(tput sgr0)
|
||||
git_repo_url="https://git.mst.k.vu/mst/catask"
|
||||
|
@ -14,7 +14,7 @@ echo "${bold}Cloning the repository...${normal}"
|
|||
# this might work... or not, who knows
|
||||
id -u catask >/dev/null 2>&1 || sudo useradd -r -s /bin/false -m -d /etc/catask -U catask
|
||||
# cloning dev branch for now because the installer doesn't exist in main branch yet
|
||||
git clone $git_repo_url $working_dir --branch dev
|
||||
sudo git clone $git_repo_url $working_dir --branch dev
|
||||
cd $working_dir
|
||||
echo
|
||||
echo "${bold}Creating & activating virtual environment...${normal}"
|
||||
|
@ -25,8 +25,8 @@ echo
|
|||
pip install -r requirements.txt
|
||||
|
||||
# move to /etc/catask after installing packages
|
||||
sudo mv $working_dir /etc/
|
||||
working_dir="/etc/catask"
|
||||
# sudo mv $working_dir /etc/
|
||||
# working_dir="/etc/catask"
|
||||
|
||||
# check if redis is installed
|
||||
if ! command -v redis-cli 2>&1 >/dev/null; then
|
||||
|
@ -44,11 +44,11 @@ if ! command -v redis-cli 2>&1 >/dev/null; then
|
|||
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install redis
|
||||
sudo apt-get install redis -y
|
||||
;;
|
||||
fedora)
|
||||
# standard redis install instructions from https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/#install-on-red-hatrocky
|
||||
sudo dnf install redis
|
||||
sudo dnf install redis -y
|
||||
sudo systemctl enable redis
|
||||
sudo systemctl start redis
|
||||
;;
|
||||
|
@ -62,7 +62,6 @@ fi
|
|||
|
||||
echo
|
||||
echo "${bold}Configuring CatAsk...${normal}"
|
||||
cd $working_dir
|
||||
cp $working_dir/.env.example $working_dir/.env; cp $working_dir/config.example.json $working_dir/config.json
|
||||
echo
|
||||
read -n 1 -s -r -p "Press any key to open main config file..."
|
||||
|
@ -73,11 +72,9 @@ nano .env
|
|||
echo
|
||||
echo "${bold}Initializing the database...${normal}"
|
||||
if flask init-db; then : ; else
|
||||
# echo 'If the error is "MySQL Connection not available." then you can safely ignore it'
|
||||
echo "Otherwise, create an issue at ${git_repo_issue_url}"
|
||||
echo "An error has occurred: create an issue at ${bold}${git_repo_issue_url}${normal}"
|
||||
read -p "Proceed? (y/N) " proceed_after_error
|
||||
proceed_after_error="${proceed_after_error,,}"
|
||||
echo $proceed_after_error
|
||||
if [[ "$proceed_after_error" == 'y' ]]; then
|
||||
echo "Proceeding..."
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue